twilio
Module twilio
API
Definitions
dilansorg/twilio
Overview
The Twilio API provides the capability to access its platform for communications. These APIs connect the software layer and communication networks worldwide, enabling users to call and message anyone globally.
This package supports Twilio Basic API version 2010-04-01.
Prerequisites
Before using this connector in your Ballerina application, please complete the following steps:
-
Create a Twilio account.
-
Obtain a Twilio phone number.
Tip: If you are using a trial account, you may need to verify your recipients' phone numbers before initiating any communication with them.
-
Obtain a Twilio Account Auth Token.
-
Configure the connector with the obtained tokens.
Quickstart
To use the Twilio connector in your Ballerina application, update the .bal
file as follows:
Step 1 - Import the package
Import the Twilio package into your Ballerina program as shown below:
import ballerinax/twilio;
Step 2 - Create a new connector instance
To create a new connector instance, add a configuration as follows (You can use configurable variables to provide the necessary credentials):
configurable string accountSID= ?; configurable string authToken = ?; twilio:ConnectionConfig twilioConfig = { auth: { username: accountSID, password: authToken } }; twilio:Client twilioClient = check new (twilioConfig);
Step 3 - Invoke the connector operation
- Invoke the connector operation using the client as shown below:
public function main() returns error? { twilio:Account account = check twilioClient->fetchAccount(accountSID); }
- Use
bal run
command to compile and run the Ballerina program.
You can find more samples here
Examples
Send SMS
This sample demonstrates a scenario where the Twilio connector is used to send a text message to a number.
import ballerina/io; import ballerinax/twilio; // Account configurations configurable string accountSID= ?; configurable string authToken = ?; public function main() returns error? { // Twilio Client configuration twilio:ConnectionConfig twilioConfig = { auth: { username: accountSID, password: authToken } }; // Initialize Twilio Client twilio:Client twilioClient = check new (twilioConfig); // Create a request for SMS twilio:CreateMessageRequest messageRequest = { To: "+XXXXXXXXXXX", From: "+XXXXXXXXXXX", Body: "Hello from Ballerina" }; // Send the SMS twilio:Message response = check twilioClient->createMessage(accountSID, messageRequest); // Print SMS status io:print(response?.status); }
Make a call
This sample demonstrates a scenario where the Twilio connector is used to make a voice call to a number.
import ballerina/io; import ballerinax/twilio; // Account configurations configurable string accountSID= ?; configurable string authToken = ?; public function main() returns error? { // Twilio Client configuration twilio:ConnectionConfig twilioConfig = { auth: { username: accountSID, password: authToken } }; // Initialize Twilio Client twilio:Client twilioClient = check new (twilioConfig); // Create a request to make a voice call twilio:CreateCallRequest callRequest = { To: "+XXXXXXXXXXX", From: "+XXXXXXXXXXX", Url: "http://demo.twilio.com/docs/voice.xml" }; // Make a voice call twilio:Call response = check twilioClient->createCall(accountSID, callRequest); // Print call status io:print(response?.status); }
Functions
main
function main()
Clients
twilio: Client
This is the public Twilio REST API.
Constructor
Gets invoked to initialize the connector
.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.twilio.com" - URL of the target service
listAccount
function listAccount(string? friendlyName, Account_enum_status? status, int? pageSize, int? page, string? pageToken) returns ListAccountResponse|error
Retrieves a collection of Accounts belonging to the account used to make the request
Parameters
- friendlyName string? (default ()) - Only return the Account resources with friendly names that exactly match this name.
- status Account_enum_status? (default ()) - Only return Account resources with the given status. Can be
closed
,suspended
oractive
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
- ListAccountResponse|error - OK
createAccount
function createAccount(CreateAccountRequest payload) returns Account|error
Create a new Twilio Subaccount from the account making the request
Parameters
- payload CreateAccountRequest -
fetchAccount
Fetch the account specified by the provided Account Sid
Parameters
- sid string - The Account Sid that uniquely identifies the account to fetch
updateAccount
function updateAccount(string sid, UpdateAccountRequest payload) returns Account|error
Modify the properties of a given Account
Parameters
- sid string - The Account Sid that uniquely identifies the account to update
- payload UpdateAccountRequest - UpdateAccountRequest
listAddress
function listAddress(string? customerName, string? friendlyName, string? isoCountry, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListAddressResponse|error
List Address
Parameters
- customerName string? (default ()) - The
customer_name
of the Address resources to read.
- friendlyName string? (default ()) - The string that identifies the Address resources to read.
- isoCountry string? (default ()) - The ISO country code of the Address resources to read.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
- ListAddressResponse|error - OK
createAddress
function createAddress(CreateAddressRequest payload, string? accountSid) returns Address|error
Create Address
Parameters
- payload CreateAddressRequest -
fetchAddress
Fetch Address
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Address resource to fetch.
updateAddress
function updateAddress(string sid, UpdateAddressRequest payload, string? accountSid) returns Address|error
Update Address
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Address resource to update.
- payload UpdateAddressRequest -
deleteAddress
Delete Address
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Address resource to delete.
listApplication
function listApplication(string? friendlyName, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListApplicationResponse|error
Retrieve a list of applications representing an application within the requesting account
Parameters
- friendlyName string? (default ()) - The string that identifies the Application resources to read.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createApplication
function createApplication(CreateApplicationRequest payload, string? accountSid) returns Application|error
Create a new application within your account
Parameters
- payload CreateApplicationRequest -
Return Type
- Application|error - Created
fetchApplication
function fetchApplication(string sid, string? accountSid) returns Application|error
Fetch the application specified by the provided sid
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Application resource to fetch.
Return Type
- Application|error - OK
updateApplication
function updateApplication(string sid, UpdateApplicationRequest payload, string? accountSid) returns Application|error
Updates the application's properties
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Application resource to update.
- payload UpdateApplicationRequest -
Return Type
- Application|error - OK
deleteApplication
Delete the application by the specified application sid
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Application resource to delete.
fetchAuthorizedConnectApp
function fetchAuthorizedConnectApp(string connectAppSid, string? accountSid) returns Authorized_connect_app|error
Fetch an instance of an authorized-connect-app
Parameters
- connectAppSid string - The SID of the Connect App to fetch.
Return Type
listAuthorizedConnectApp
function listAuthorizedConnectApp(int? pageSize, int? page, string? pageToken, string? accountSid) returns ListAuthorizedConnectAppResponse|error
Retrieve a list of authorized-connect-apps belonging to the account used to make the request
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberCountry
function listAvailablePhoneNumberCountry(int? pageSize, int? page, string? pageToken, string? accountSid) returns ListAvailablePhoneNumberCountryResponse|error
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchAvailablePhoneNumberCountry
function fetchAvailablePhoneNumberCountry(string countryCode, string? accountSid) returns Available_phone_number_country|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country to fetch available phone number information about.
Return Type
listAvailablePhoneNumberLocal
function listAvailablePhoneNumberLocal(string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListAvailablePhoneNumberLocalResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberMachineToMachine
function listAvailablePhoneNumberMachineToMachine(string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListAvailablePhoneNumberMachineToMachineResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberMobile
function listAvailablePhoneNumberMobile(string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListAvailablePhoneNumberMobileResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberNational
function listAvailablePhoneNumberNational(string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListAvailablePhoneNumberNationalResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberSharedCost
function listAvailablePhoneNumberSharedCost(string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListAvailablePhoneNumberSharedCostResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberTollFree
function listAvailablePhoneNumberTollFree(string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListAvailablePhoneNumberTollFreeResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberVoip
function listAvailablePhoneNumberVoip(string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListAvailablePhoneNumberVoipResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchBalance
Fetch the balance for an Account based on Account Sid. Balance changes may not be reflected immediately. Child accounts do not contain balance information
Parameters
- accountSid string? (default ()) - The unique SID identifier of the Account.
listCall
function listCall(string? to, string? 'from, string? parentCallSid, Call_enum_status? status, string? startTime, string? startedOnOrBefore, string? startedOnOrAfter, string? endTime, string? endedOnOrBefore, string? endedOnOrAfter, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListCallResponse|error
Retrieves a collection of calls made to and from your account
Parameters
- to string? (default ()) - Only show calls made to this phone number, SIP address, Client identifier or SIM SID.
- 'from string? (default ()) - Only include calls from this phone number, SIP address, Client identifier or SIM SID.
- parentCallSid string? (default ()) - Only include calls spawned by calls with this SID.
- status Call_enum_status? (default ()) - The status of the calls to include. Can be:
queued
,ringing
,in-progress
,canceled
,completed
,failed
,busy
, orno-answer
.
- startTime string? (default ()) - Only include calls that started on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read only calls that started on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read calls that started on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read calls that started on or after midnight of this date.
- startedOnOrBefore string? (default ()) - Only include calls that started on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read only calls that started on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read calls that started on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read calls that started on or after midnight of this date.
- startedOnOrAfter string? (default ()) - Only include calls that started on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read only calls that started on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read calls that started on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read calls that started on or after midnight of this date.
- endTime string? (default ()) - Only include calls that ended on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read only calls that ended on this date. You can also specify an inequality, such asEndTime<=YYYY-MM-DD
, to read calls that ended on or before midnight of this date, andEndTime>=YYYY-MM-DD
to read calls that ended on or after midnight of this date.
- endedOnOrBefore string? (default ()) - Only include calls that ended on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read only calls that ended on this date. You can also specify an inequality, such asEndTime<=YYYY-MM-DD
, to read calls that ended on or before midnight of this date, andEndTime>=YYYY-MM-DD
to read calls that ended on or after midnight of this date.
- endedOnOrAfter string? (default ()) - Only include calls that ended on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read only calls that ended on this date. You can also specify an inequality, such asEndTime<=YYYY-MM-DD
, to read calls that ended on or before midnight of this date, andEndTime>=YYYY-MM-DD
to read calls that ended on or after midnight of this date.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
- ListCallResponse|error - OK
createCall
function createCall(CreateCallRequest payload, string? accountSid) returns Call|error
Create a new outgoing call to phones, SIP-enabled endpoints or Twilio Client connections
Parameters
- payload CreateCallRequest -
fetchCall
Fetch the call specified by the provided Call SID
Parameters
- sid string - The SID of the Call resource to fetch.
updateCall
function updateCall(string sid, UpdateCallRequest payload, string? accountSid) returns Call|error
Initiates a call redirect or terminates a call
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Call resource to update
- payload UpdateCallRequest -
deleteCall
Delete a Call record from your account. Once the record is deleted, it will no longer appear in the API and Account Portal logs.
Parameters
- sid string - The Twilio-provided Call SID that uniquely identifies the Call resource to delete
listCallEvent
function listCallEvent(string callSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListCallEventResponse|error
Retrieve a list of all events for a call.
Parameters
- callSid string - The unique SID identifier of the Call.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
- accountSid string? (default ()) - The unique SID identifier of the Account.
Return Type
fetchCallFeedback
function fetchCallFeedback(string callSid, string? accountSid) returns CallCall_feedback|error
Fetch a Feedback resource from a call
Parameters
- callSid string - The call sid that uniquely identifies the call
Return Type
- CallCall_feedback|error - OK
updateCallFeedback
function updateCallFeedback(string callSid, UpdateCallFeedbackRequest payload, string? accountSid) returns CallCall_feedback|error
Update a Feedback resource for a call
Parameters
- callSid string - The call sid that uniquely identifies the call
- payload UpdateCallFeedbackRequest -
Return Type
- CallCall_feedback|error - OK
createCallFeedbackSummary
function createCallFeedbackSummary(CreateCallFeedbackSummaryRequest payload, string? accountSid) returns CallCall_feedback_summary|error
Create a FeedbackSummary resource for a call
Parameters
- payload CreateCallFeedbackSummaryRequest -
Return Type
- CallCall_feedback_summary|error - Created
fetchCallFeedbackSummary
function fetchCallFeedbackSummary(string sid, string? accountSid) returns CallCall_feedback_summary|error
Fetch a FeedbackSummary resource from a call
Parameters
- sid string - A 34 character string that uniquely identifies this resource.
Return Type
deleteCallFeedbackSummary
Delete a FeedbackSummary resource from a call
Parameters
- sid string - A 34 character string that uniquely identifies this resource.
fetchCallNotification
function fetchCallNotification(string callSid, string sid, string? accountSid) returns CallCall_notificationInstance|error
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Call Notification resource to fetch.
Return Type
listCallNotification
function listCallNotification(string callSid, int? log, string? messageDate, string? loggedAtOrBefore, string? loggedAtOrAfter, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListCallNotificationResponse|error
Parameters
- log int? (default ()) - Only read notifications of the specified log level. Can be:
0
to read only ERROR notifications or1
to read only WARNING notifications. By default, all notifications are read.
- messageDate string? (default ()) - Only show notifications for the specified date, formatted as
YYYY-MM-DD
. You can also specify an inequality, such as<=YYYY-MM-DD
for messages logged at or before midnight on a date, or>=YYYY-MM-DD
for messages logged at or after midnight on a date.
- loggedAtOrBefore string? (default ()) - Only show notifications for the specified date, formatted as
YYYY-MM-DD
. You can also specify an inequality, such as<=YYYY-MM-DD
for messages logged at or before midnight on a date, or>=YYYY-MM-DD
for messages logged at or after midnight on a date.
- loggedAtOrAfter string? (default ()) - Only show notifications for the specified date, formatted as
YYYY-MM-DD
. You can also specify an inequality, such as<=YYYY-MM-DD
for messages logged at or before midnight on a date, or>=YYYY-MM-DD
for messages logged at or after midnight on a date.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listCallRecording
function listCallRecording(string callSid, string? dateCreated, string? dateCreatedOnOrBefore, string? dateCreatedOnOrAfter, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListCallRecordingResponse|error
Retrieve a list of recordings belonging to the call used to make the request
Parameters
- dateCreated string? (default ()) - The
date_created
value, specified asYYYY-MM-DD
, of the resources to read. You can also specify inequality:DateCreated<=YYYY-MM-DD
will return recordings generated at or before midnight on a given date, andDateCreated>=YYYY-MM-DD
returns recordings generated at or after midnight on a date.
- dateCreatedOnOrBefore string? (default ()) - The
date_created
value, specified asYYYY-MM-DD
, of the resources to read. You can also specify inequality:DateCreated<=YYYY-MM-DD
will return recordings generated at or before midnight on a given date, andDateCreated>=YYYY-MM-DD
returns recordings generated at or after midnight on a date.
- dateCreatedOnOrAfter string? (default ()) - The
date_created
value, specified asYYYY-MM-DD
, of the resources to read. You can also specify inequality:DateCreated<=YYYY-MM-DD
will return recordings generated at or before midnight on a given date, andDateCreated>=YYYY-MM-DD
returns recordings generated at or after midnight on a date.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createCallRecording
function createCallRecording(string callSid, CreateCallRecordingRequest payload, string? accountSid) returns CallCall_recording|error
Create a recording for the call
Parameters
- payload CreateCallRecordingRequest -
Return Type
- CallCall_recording|error - Created
fetchCallRecording
function fetchCallRecording(string callSid, string sid, string? accountSid) returns CallCall_recording|error
Fetch an instance of a recording for a call
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Recording resource to fetch.
Return Type
- CallCall_recording|error - OK
updateCallRecording
function updateCallRecording(string callSid, string sid, UpdateCallRecordingRequest payload, string? accountSid) returns CallCall_recording|error
Changes the status of the recording to paused, stopped, or in-progress. Note: Pass Twilio.CURRENT
instead of recording sid to reference current active recording.
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Recording resource to update.
- payload UpdateCallRecordingRequest -
Return Type
- CallCall_recording|error - OK
deleteCallRecording
Delete a recording from your account
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Recording resource to delete.
fetchConference
function fetchConference(string sid, string? accountSid) returns Conference|error
Fetch an instance of a conference
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Conference resource to fetch
Return Type
- Conference|error - OK
updateConference
function updateConference(string sid, UpdateConferenceRequest payload, string? accountSid) returns Conference|error
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Conference resource to update
- payload UpdateConferenceRequest -
Return Type
- Conference|error - OK
listConference
function listConference(string? dateCreated, string? dateCreatedOnOrBefore, string? dateCreatedOnOrAfter, string? dateUpdated, string? dateUpdatedOnOrBefore, string? dateUpdatedOnOrAfter, string? friendlyName, Conference_enum_status? status, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListConferenceResponse|error
Retrieve a list of conferences belonging to the account used to make the request
Parameters
- dateCreated string? (default ()) - The
date_created
value, specified asYYYY-MM-DD
, of the resources to read. To read conferences that started on or before midnight on a date, use<=YYYY-MM-DD
, and to specify conferences that started on or after midnight on a date, use>=YYYY-MM-DD
.
- dateCreatedOnOrBefore string? (default ()) - The
date_created
value, specified asYYYY-MM-DD
, of the resources to read. To read conferences that started on or before midnight on a date, use<=YYYY-MM-DD
, and to specify conferences that started on or after midnight on a date, use>=YYYY-MM-DD
.
- dateCreatedOnOrAfter string? (default ()) - The
date_created
value, specified asYYYY-MM-DD
, of the resources to read. To read conferences that started on or before midnight on a date, use<=YYYY-MM-DD
, and to specify conferences that started on or after midnight on a date, use>=YYYY-MM-DD
.
- dateUpdated string? (default ()) - The
date_updated
value, specified asYYYY-MM-DD
, of the resources to read. To read conferences that were last updated on or before midnight on a date, use<=YYYY-MM-DD
, and to specify conferences that were last updated on or after midnight on a given date, use>=YYYY-MM-DD
.
- dateUpdatedOnOrBefore string? (default ()) - The
date_updated
value, specified asYYYY-MM-DD
, of the resources to read. To read conferences that were last updated on or before midnight on a date, use<=YYYY-MM-DD
, and to specify conferences that were last updated on or after midnight on a given date, use>=YYYY-MM-DD
.
- dateUpdatedOnOrAfter string? (default ()) - The
date_updated
value, specified asYYYY-MM-DD
, of the resources to read. To read conferences that were last updated on or before midnight on a date, use<=YYYY-MM-DD
, and to specify conferences that were last updated on or after midnight on a given date, use>=YYYY-MM-DD
.
- friendlyName string? (default ()) - The string that identifies the Conference resources to read.
- status Conference_enum_status? (default ()) - The status of the resources to read. Can be:
init
,in-progress
, orcompleted
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchConferenceRecording
function fetchConferenceRecording(string conferenceSid, string sid, string? accountSid) returns ConferenceConference_recording|error
Fetch an instance of a recording for a call
Parameters
- conferenceSid string - The Conference SID that identifies the conference associated with the recording to fetch.
- sid string - The Twilio-provided string that uniquely identifies the Conference Recording resource to fetch.
Return Type
updateConferenceRecording
function updateConferenceRecording(string conferenceSid, string sid, UpdateConferenceRecordingRequest payload, string? accountSid) returns ConferenceConference_recording|error
Changes the status of the recording to paused, stopped, or in-progress. Note: To use Twilio.CURRENT
, pass it as recording sid.
Parameters
- conferenceSid string - The Conference SID that identifies the conference associated with the recording to update.
- sid string - The Twilio-provided string that uniquely identifies the Conference Recording resource to update. Use
Twilio.CURRENT
to reference the current active recording.
- payload UpdateConferenceRecordingRequest -
Return Type
deleteConferenceRecording
function deleteConferenceRecording(string conferenceSid, string sid, string? accountSid) returns Response|error
Delete a recording from your account
Parameters
- conferenceSid string - The Conference SID that identifies the conference associated with the recording to delete.
- sid string - The Twilio-provided string that uniquely identifies the Conference Recording resource to delete.
listConferenceRecording
function listConferenceRecording(string conferenceSid, string? dateCreated, string? dateCreatedOnOrBefore, string? dateCreatedOnOrAfter, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListConferenceRecordingResponse|error
Retrieve a list of recordings belonging to the call used to make the request
Parameters
- conferenceSid string - The Conference SID that identifies the conference associated with the recording to read.
- dateCreated string? (default ()) - The
date_created
value, specified asYYYY-MM-DD
, of the resources to read. You can also specify inequality:DateCreated<=YYYY-MM-DD
will return recordings generated at or before midnight on a given date, andDateCreated>=YYYY-MM-DD
returns recordings generated at or after midnight on a date.
- dateCreatedOnOrBefore string? (default ()) - The
date_created
value, specified asYYYY-MM-DD
, of the resources to read. You can also specify inequality:DateCreated<=YYYY-MM-DD
will return recordings generated at or before midnight on a given date, andDateCreated>=YYYY-MM-DD
returns recordings generated at or after midnight on a date.
- dateCreatedOnOrAfter string? (default ()) - The
date_created
value, specified asYYYY-MM-DD
, of the resources to read. You can also specify inequality:DateCreated<=YYYY-MM-DD
will return recordings generated at or before midnight on a given date, andDateCreated>=YYYY-MM-DD
returns recordings generated at or after midnight on a date.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchConnectApp
function fetchConnectApp(string sid, string? accountSid) returns Connect_app|error
Fetch an instance of a connect-app
Parameters
- sid string - The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch.
Return Type
- Connect_app|error - OK
updateConnectApp
function updateConnectApp(string sid, UpdateConnectAppRequest payload, string? accountSid) returns Connect_app|error
Update a connect-app with the specified parameters
Parameters
- sid string - The Twilio-provided string that uniquely identifies the ConnectApp resource to update.
- payload UpdateConnectAppRequest -
Return Type
- Connect_app|error - OK
deleteConnectApp
Delete an instance of a connect-app
Parameters
- sid string - The Twilio-provided string that uniquely identifies the ConnectApp resource to fetch.
listConnectApp
function listConnectApp(int? pageSize, int? page, string? pageToken, string? accountSid) returns ListConnectAppResponse|error
Retrieve a list of connect-apps belonging to the account used to make the request
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listDependentPhoneNumber
function listDependentPhoneNumber(string addressSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListDependentPhoneNumberResponse|error
Parameters
- addressSid string - The SID of the Address resource associated with the phone number.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchIncomingPhoneNumber
function fetchIncomingPhoneNumber(string sid, string? accountSid) returns Incoming_phone_number|error
Fetch an incoming-phone-number belonging to the account used to make the request.
Parameters
- sid string - The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to fetch.
Return Type
updateIncomingPhoneNumber
function updateIncomingPhoneNumber(string sid, UpdateIncomingPhoneNumberRequest payload, string? accountSid) returns Incoming_phone_number|error
Update an incoming-phone-number instance.
Parameters
- sid string - The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to update.
- payload UpdateIncomingPhoneNumberRequest -
- accountSid string? (default ()) - The SID of the Account that created the IncomingPhoneNumber resource to update. For more information, see Exchanging Numbers Between Subaccounts.
Return Type
deleteIncomingPhoneNumber
Delete a phone-numbers belonging to the account used to make the request.
Parameters
- sid string - The Twilio-provided string that uniquely identifies the IncomingPhoneNumber resource to delete.
listIncomingPhoneNumber
function listIncomingPhoneNumber(boolean? beta, string? friendlyName, string? phoneNumber, string? origin, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListIncomingPhoneNumberResponse|error
Retrieve a list of incoming-phone-numbers belonging to the account used to make the request.
Parameters
- beta boolean? (default ()) - Whether to include phone numbers new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- friendlyName string? (default ()) - A string that identifies the IncomingPhoneNumber resources to read.
- phoneNumber string? (default ()) - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
- origin string? (default ()) - Whether to include phone numbers based on their origin. Can be:
twilio
orhosted
. By default, phone numbers of all origin are included.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createIncomingPhoneNumber
function createIncomingPhoneNumber(CreateIncomingPhoneNumberRequest payload, string? accountSid) returns Incoming_phone_number|error
Purchase a phone-number for the account.
Parameters
- payload CreateIncomingPhoneNumberRequest -
Return Type
- Incoming_phone_number|error - Created
fetchIncomingPhoneNumberAssignedAddOn
function fetchIncomingPhoneNumberAssignedAddOn(string resourceSid, string sid, string? accountSid) returns Incoming_phone_numberIncoming_phone_number_assigned_add_on|error
Fetch an instance of an Add-on installation currently assigned to this Number.
Parameters
- resourceSid string - The SID of the Phone Number to which the Add-on is assigned.
- sid string - The Twilio-provided string that uniquely identifies the resource to fetch.
Return Type
deleteIncomingPhoneNumberAssignedAddOn
function deleteIncomingPhoneNumberAssignedAddOn(string resourceSid, string sid, string? accountSid) returns Response|error
Remove the assignment of an Add-on installation from the Number specified.
Parameters
- resourceSid string - The SID of the Phone Number to which the Add-on is assigned.
- sid string - The Twilio-provided string that uniquely identifies the resource to delete.
listIncomingPhoneNumberAssignedAddOn
function listIncomingPhoneNumberAssignedAddOn(string resourceSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListIncomingPhoneNumberAssignedAddOnResponse|error
Retrieve a list of Add-on installations currently assigned to this Number.
Parameters
- resourceSid string - The SID of the Phone Number to which the Add-on is assigned.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createIncomingPhoneNumberAssignedAddOn
function createIncomingPhoneNumberAssignedAddOn(string resourceSid, CreateIncomingPhoneNumberAssignedAddOnRequest payload, string? accountSid) returns Incoming_phone_numberIncoming_phone_number_assigned_add_on|error
Assign an Add-on installation to the Number specified.
Parameters
- resourceSid string - The SID of the Phone Number to assign the Add-on.
Return Type
fetchIncomingPhoneNumberAssignedAddOnExtension
function fetchIncomingPhoneNumberAssignedAddOnExtension(string resourceSid, string assignedAddOnSid, string sid, string? accountSid) returns Incoming_phone_numberIncoming_phone_number_assigned_add_onIncoming_phone_number_assigned_add_on_extension|error
Fetch an instance of an Extension for the Assigned Add-on.
Parameters
- resourceSid string - The SID of the Phone Number to which the Add-on is assigned.
- assignedAddOnSid string - The SID that uniquely identifies the assigned Add-on installation.
- sid string - The Twilio-provided string that uniquely identifies the resource to fetch.
Return Type
listIncomingPhoneNumberAssignedAddOnExtension
function listIncomingPhoneNumberAssignedAddOnExtension(string resourceSid, string assignedAddOnSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListIncomingPhoneNumberAssignedAddOnExtensionResponse|error
Retrieve a list of Extensions for the Assigned Add-on.
Parameters
- resourceSid string - The SID of the Phone Number to which the Add-on is assigned.
- assignedAddOnSid string - The SID that uniquely identifies the assigned Add-on installation.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listIncomingPhoneNumberLocal
function listIncomingPhoneNumberLocal(boolean? beta, string? friendlyName, string? phoneNumber, string? origin, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListIncomingPhoneNumberLocalResponse|error
Parameters
- beta boolean? (default ()) - Whether to include phone numbers new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- friendlyName string? (default ()) - A string that identifies the resources to read.
- phoneNumber string? (default ()) - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
- origin string? (default ()) - Whether to include phone numbers based on their origin. Can be:
twilio
orhosted
. By default, phone numbers of all origin are included.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createIncomingPhoneNumberLocal
function createIncomingPhoneNumberLocal(CreateIncomingPhoneNumberLocalRequest payload, string? accountSid) returns Incoming_phone_numberIncoming_phone_number_local|error
Parameters
- payload CreateIncomingPhoneNumberLocalRequest -
Return Type
listIncomingPhoneNumberMobile
function listIncomingPhoneNumberMobile(boolean? beta, string? friendlyName, string? phoneNumber, string? origin, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListIncomingPhoneNumberMobileResponse|error
Parameters
- beta boolean? (default ()) - Whether to include phone numbers new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- friendlyName string? (default ()) - A string that identifies the resources to read.
- phoneNumber string? (default ()) - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
- origin string? (default ()) - Whether to include phone numbers based on their origin. Can be:
twilio
orhosted
. By default, phone numbers of all origin are included.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createIncomingPhoneNumberMobile
function createIncomingPhoneNumberMobile(CreateIncomingPhoneNumberMobileRequest payload, string? accountSid) returns Incoming_phone_numberIncoming_phone_number_mobile|error
Parameters
- payload CreateIncomingPhoneNumberMobileRequest -
Return Type
listIncomingPhoneNumberTollFree
function listIncomingPhoneNumberTollFree(boolean? beta, string? friendlyName, string? phoneNumber, string? origin, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListIncomingPhoneNumberTollFreeResponse|error
Parameters
- beta boolean? (default ()) - Whether to include phone numbers new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- friendlyName string? (default ()) - A string that identifies the resources to read.
- phoneNumber string? (default ()) - The phone numbers of the IncomingPhoneNumber resources to read. You can specify partial numbers and use '*' as a wildcard for any digit.
- origin string? (default ()) - Whether to include phone numbers based on their origin. Can be:
twilio
orhosted
. By default, phone numbers of all origin are included.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createIncomingPhoneNumberTollFree
function createIncomingPhoneNumberTollFree(CreateIncomingPhoneNumberTollFreeRequest payload, string? accountSid) returns Incoming_phone_numberIncoming_phone_number_toll_free|error
Parameters
- payload CreateIncomingPhoneNumberTollFreeRequest -
Return Type
fetchKey
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Key resource to fetch.
updateKey
function updateKey(string sid, UpdateKeyRequest payload, string? accountSid) returns Key|error
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Key resource to update.
- payload UpdateKeyRequest -
deleteKey
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Key resource to delete.
listKey
function listKey(int? pageSize, int? page, string? pageToken, string? accountSid) returns ListKeyResponse|error
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
- ListKeyResponse|error - OK
createNewKey
function createNewKey(CreateNewKeyRequest payload, string? accountSid) returns New_key|error
Parameters
- payload CreateNewKeyRequest -
fetchMedia
function fetchMedia(string messageSid, string sid, string? accountSid) returns MessageMedia|error
Fetch a single Media resource associated with a specific Message resource
Parameters
- messageSid string - The SID of the Message resource that is associated with the Media resource.
- sid string - The Twilio-provided string that uniquely identifies the Media resource to fetch.
Return Type
- MessageMedia|error - OK
deleteMedia
Delete the Media resource.
Parameters
- messageSid string - The SID of the Message resource that is associated with the Media resource.
- sid string - The unique identifier of the to-be-deleted Media resource.
listMedia
function listMedia(string messageSid, string? dateCreated, string? dateCreatedOnOrBefore, string? dateCreatedOnOrAfter, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListMediaResponse|error
Read a list of Media resources associated with a specific Message resource
Parameters
- messageSid string - The SID of the Message resource that is associated with the Media resources.
- dateCreated string? (default ()) - Only include Media resources that were created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read Media that were created on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read Media that were created on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read Media that were created on or after midnight of this date.
- dateCreatedOnOrBefore string? (default ()) - Only include Media resources that were created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read Media that were created on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read Media that were created on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read Media that were created on or after midnight of this date.
- dateCreatedOnOrAfter string? (default ()) - Only include Media resources that were created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read Media that were created on this date. You can also specify an inequality, such asStartTime<=YYYY-MM-DD
, to read Media that were created on or before midnight of this date, andStartTime>=YYYY-MM-DD
to read Media that were created on or after midnight of this date.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
- ListMediaResponse|error - OK
fetchMember
function fetchMember(string queueSid, string callSid, string? accountSid) returns QueueMember|error
Fetch a specific member from the queue
Parameters
- queueSid string - The SID of the Queue in which to find the members to fetch.
Return Type
- QueueMember|error - OK
updateMember
function updateMember(string queueSid, string callSid, UpdateMemberRequest payload, string? accountSid) returns QueueMember|error
Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL
Parameters
- queueSid string - The SID of the Queue in which to find the members to update.
- payload UpdateMemberRequest -
Return Type
- QueueMember|error - OK
listMember
function listMember(string queueSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListMemberResponse|error
Retrieve the members of the queue
Parameters
- queueSid string - The SID of the Queue in which to find the members
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
- ListMemberResponse|error - OK
listMessage
function listMessage(string? to, string? 'from, string? dateSent, string? dateSentOnOrBefore, string? dateSentOnOrAfter, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListMessageResponse|error
Retrieve a list of Message resources associated with a Twilio Account
Parameters
- to string? (default ()) - Filter by recipient. For example: Set this
to
parameter to+15558881111
to retrieve a list of Message resources withto
properties of+15558881111
- 'from string? (default ()) - Filter by sender. For example: Set this
from
parameter to+15552229999
to retrieve a list of Message resources withfrom
properties of+15552229999
- dateSent string? (default ()) - Filter by Message
sent_date
. Accepts GMT dates in the following formats:YYYY-MM-DD
(to find Messages with a specificsent_date
),<=YYYY-MM-DD
(to find Messages withsent_date
s on and before a specific date), and>=YYYY-MM-DD
(to find Messages withsent_dates
on and after a specific date).
- dateSentOnOrBefore string? (default ()) - Filter by Message
sent_date
. Accepts GMT dates in the following formats:YYYY-MM-DD
(to find Messages with a specificsent_date
),<=YYYY-MM-DD
(to find Messages withsent_date
s on and before a specific date), and>=YYYY-MM-DD
(to find Messages withsent_dates
on and after a specific date).
- dateSentOnOrAfter string? (default ()) - Filter by Message
sent_date
. Accepts GMT dates in the following formats:YYYY-MM-DD
(to find Messages with a specificsent_date
),<=YYYY-MM-DD
(to find Messages withsent_date
s on and before a specific date), and>=YYYY-MM-DD
(to find Messages withsent_dates
on and after a specific date).
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
- ListMessageResponse|error - OK
createMessage
function createMessage(CreateMessageRequest payload, string? accountSid) returns Message|error
Send a message
Parameters
- payload CreateMessageRequest -
fetchMessage
Fetch a specific Message
Parameters
- sid string - The SID of the Message resource to be fetched
updateMessage
function updateMessage(string sid, UpdateMessageRequest payload, string? accountSid) returns Message|error
Update a Message resource (used to redact Message body
text and to cancel not-yet-sent messages)
deleteMessage
Deletes a Message resource from your account
Parameters
- sid string - The SID of the Message resource you wish to delete
createMessageFeedback
function createMessageFeedback(string messageSid, CreateMessageFeedbackRequest payload, string? accountSid) returns MessageMessage_feedback|error
Create Message Feedback to confirm a tracked user action was performed by the recipient of the associated Message
Parameters
- messageSid string - The SID of the Message resource for which to create MessageFeedback.
- payload CreateMessageFeedbackRequest -
Return Type
- MessageMessage_feedback|error - Created
listSigningKey
function listSigningKey(int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSigningKeyResponse|error
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
- accountSid string? (default ()) -
Return Type
createNewSigningKey
function createNewSigningKey(CreateNewSigningKeyRequest payload, string? accountSid) returns New_signing_key|error
Create a new Signing Key for the account making the request.
Parameters
- payload CreateNewSigningKeyRequest -
Return Type
- New_signing_key|error - Created
fetchNotification
function fetchNotification(string sid, string? accountSid) returns NotificationInstance|error
Fetch a notification belonging to the account used to make the request
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Notification resource to fetch.
Return Type
listNotification
function listNotification(int? log, string? messageDate, string? loggedAtOrBefore, string? loggedAtOrAfter, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListNotificationResponse|error
Retrieve a list of notifications belonging to the account used to make the request
Parameters
- log int? (default ()) - Only read notifications of the specified log level. Can be:
0
to read only ERROR notifications or1
to read only WARNING notifications. By default, all notifications are read.
- messageDate string? (default ()) - Only show notifications for the specified date, formatted as
YYYY-MM-DD
. You can also specify an inequality, such as<=YYYY-MM-DD
for messages logged at or before midnight on a date, or>=YYYY-MM-DD
for messages logged at or after midnight on a date.
- loggedAtOrBefore string? (default ()) - Only show notifications for the specified date, formatted as
YYYY-MM-DD
. You can also specify an inequality, such as<=YYYY-MM-DD
for messages logged at or before midnight on a date, or>=YYYY-MM-DD
for messages logged at or after midnight on a date.
- loggedAtOrAfter string? (default ()) - Only show notifications for the specified date, formatted as
YYYY-MM-DD
. You can also specify an inequality, such as<=YYYY-MM-DD
for messages logged at or before midnight on a date, or>=YYYY-MM-DD
for messages logged at or after midnight on a date.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchOutgoingCallerId
function fetchOutgoingCallerId(string sid, string? accountSid) returns Outgoing_caller_id|error
Fetch an outgoing-caller-id belonging to the account used to make the request
Parameters
- sid string - The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to fetch.
Return Type
- Outgoing_caller_id|error - OK
updateOutgoingCallerId
function updateOutgoingCallerId(string sid, UpdateOutgoingCallerIdRequest payload, string? accountSid) returns Outgoing_caller_id|error
Updates the caller-id
Parameters
- sid string - The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to update.
- payload UpdateOutgoingCallerIdRequest -
Return Type
- Outgoing_caller_id|error - OK
deleteOutgoingCallerId
Delete the caller-id specified from the account
Parameters
- sid string - The Twilio-provided string that uniquely identifies the OutgoingCallerId resource to delete.
listOutgoingCallerId
function listOutgoingCallerId(string? phoneNumber, string? friendlyName, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListOutgoingCallerIdResponse|error
Retrieve a list of outgoing-caller-ids belonging to the account used to make the request
Parameters
- phoneNumber string? (default ()) - The phone number of the OutgoingCallerId resources to read.
- friendlyName string? (default ()) - The string that identifies the OutgoingCallerId resources to read.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createValidationRequest
function createValidationRequest(CreateValidationRequestRequest payload, string? accountSid) returns Validation_request|error
Parameters
- payload CreateValidationRequestRequest -
Return Type
- Validation_request|error - Created
fetchParticipant
function fetchParticipant(string conferenceSid, string callSid, string? accountSid) returns ConferenceParticipant|error
Fetch an instance of a participant
Return Type
updateParticipant
function updateParticipant(string conferenceSid, string callSid, UpdateParticipantRequest payload, string? accountSid) returns ConferenceParticipant|error
Update the properties of the participant
Parameters
- conferenceSid string - The SID of the conference with the participant to update.
- payload UpdateParticipantRequest -
Return Type
deleteParticipant
function deleteParticipant(string conferenceSid, string callSid, string? accountSid) returns Response|error
Kick a participant from a given conference
listParticipant
function listParticipant(string conferenceSid, boolean? muted, boolean? hold, boolean? coaching, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListParticipantResponse|error
Retrieve a list of participants belonging to the account used to make the request
Parameters
- conferenceSid string - The SID of the conference with the participants to read.
- muted boolean? (default ()) - Whether to return only participants that are muted. Can be:
true
orfalse
.
- hold boolean? (default ()) - Whether to return only participants that are on hold. Can be:
true
orfalse
.
- coaching boolean? (default ()) - Whether to return only participants who are coaching another call. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createParticipant
function createParticipant(string conferenceSid, CreateParticipantRequest payload, string? accountSid) returns ConferenceParticipant|error
Parameters
- conferenceSid string - The SID of the participant's conference.
- payload CreateParticipantRequest -
Return Type
- ConferenceParticipant|error - Created
createPayments
function createPayments(string callSid, CreatePaymentsRequest payload, string? accountSid) returns CallPayments|error
create an instance of payments. This will start a new payments session
Parameters
- callSid string - The SID of the call that will create the resource. Call leg associated with this sid is expected to provide payment information thru DTMF.
- payload CreatePaymentsRequest -
Return Type
- CallPayments|error - Created
updatePayments
function updatePayments(string callSid, string sid, UpdatePaymentsRequest payload, string? accountSid) returns CallPayments|error
update an instance of payments with different phases of payment flows.
Parameters
- callSid string - The SID of the call that will update the resource. This should be the same call sid that was used to create payments resource.
- sid string - The SID of Payments session that needs to be updated.
- payload UpdatePaymentsRequest -
Return Type
- CallPayments|error - Accepted
fetchQueue
Fetch an instance of a queue identified by the QueueSid
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Queue resource to fetch
updateQueue
function updateQueue(string sid, UpdateQueueRequest payload, string? accountSid) returns Queue|error
Update the queue with the new parameters
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Queue resource to update
- payload UpdateQueueRequest -
deleteQueue
Remove an empty queue
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Queue resource to delete
listQueue
function listQueue(int? pageSize, int? page, string? pageToken, string? accountSid) returns ListQueueResponse|error
Retrieve a list of queues belonging to the account used to make the request
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
- ListQueueResponse|error - OK
createQueue
function createQueue(CreateQueueRequest payload, string? accountSid) returns Queue|error
Create a queue
Parameters
- payload CreateQueueRequest -
fetchRecording
function fetchRecording(string sid, boolean? includeSoftDeleted, string? accountSid) returns Recording|error
Fetch an instance of a recording
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Recording resource to fetch.
- includeSoftDeleted boolean? (default () ) - A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days.
deleteRecording
Delete a recording from your account
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Recording resource to delete.
listRecording
function listRecording(string? dateCreated, string? dateCreatedOnOrBefore, string? dateCreatedOnOrAfter, string? callSid, string? conferenceSid, boolean? includeSoftDeleted, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListRecordingResponse|error
Retrieve a list of recordings belonging to the account used to make the request
Parameters
- dateCreated string? (default ()) - Only include recordings that were created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read recordings that were created on this date. You can also specify an inequality, such asDateCreated<=YYYY-MM-DD
, to read recordings that were created on or before midnight of this date, andDateCreated>=YYYY-MM-DD
to read recordings that were created on or after midnight of this date.
- dateCreatedOnOrBefore string? (default ()) - Only include recordings that were created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read recordings that were created on this date. You can also specify an inequality, such asDateCreated<=YYYY-MM-DD
, to read recordings that were created on or before midnight of this date, andDateCreated>=YYYY-MM-DD
to read recordings that were created on or after midnight of this date.
- dateCreatedOnOrAfter string? (default ()) - Only include recordings that were created on this date. Specify a date as
YYYY-MM-DD
in GMT, for example:2009-07-06
, to read recordings that were created on this date. You can also specify an inequality, such asDateCreated<=YYYY-MM-DD
, to read recordings that were created on or before midnight of this date, andDateCreated>=YYYY-MM-DD
to read recordings that were created on or after midnight of this date.
- conferenceSid string? (default ()) - The Conference SID that identifies the conference associated with the recording to read.
- includeSoftDeleted boolean? (default ()) - A boolean parameter indicating whether to retrieve soft deleted recordings or not. Recordings metadata are kept after deletion for a retention period of 40 days.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchRecordingAddOnResult
function fetchRecordingAddOnResult(string referenceSid, string sid, string? accountSid) returns RecordingRecording_add_on_result|error
Fetch an instance of an AddOnResult
Parameters
- referenceSid string - The SID of the recording to which the result to fetch belongs.
- sid string - The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to fetch.
Return Type
deleteRecordingAddOnResult
function deleteRecordingAddOnResult(string referenceSid, string sid, string? accountSid) returns Response|error
Delete a result and purge all associated Payloads
Parameters
- referenceSid string - The SID of the recording to which the result to delete belongs.
- sid string - The Twilio-provided string that uniquely identifies the Recording AddOnResult resource to delete.
listRecordingAddOnResult
function listRecordingAddOnResult(string referenceSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListRecordingAddOnResultResponse|error
Retrieve a list of results belonging to the recording
Parameters
- referenceSid string - The SID of the recording to which the result to read belongs.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchRecordingAddOnResultPayload
function fetchRecordingAddOnResultPayload(string referenceSid, string addOnResultSid, string sid, string? accountSid) returns RecordingRecording_add_on_resultRecording_add_on_result_payload|error
Fetch an instance of a result payload
Parameters
- referenceSid string - The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs.
- addOnResultSid string - The SID of the AddOnResult to which the payload to fetch belongs.
- sid string - The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch.
Return Type
deleteRecordingAddOnResultPayload
function deleteRecordingAddOnResultPayload(string referenceSid, string addOnResultSid, string sid, string? accountSid) returns Response|error
Delete a payload from the result along with all associated Data
Parameters
- referenceSid string - The SID of the recording to which the AddOnResult resource that contains the payloads to delete belongs.
- addOnResultSid string - The SID of the AddOnResult to which the payloads to delete belongs.
- sid string - The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to delete.
listRecordingAddOnResultPayload
function listRecordingAddOnResultPayload(string referenceSid, string addOnResultSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListRecordingAddOnResultPayloadResponse|error
Retrieve a list of payloads belonging to the AddOnResult
Parameters
- referenceSid string - The SID of the recording to which the AddOnResult resource that contains the payloads to read belongs.
- addOnResultSid string - The SID of the AddOnResult to which the payloads to read belongs.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchRecordingTranscription
function fetchRecordingTranscription(string recordingSid, string sid, string? accountSid) returns RecordingRecording_transcription|error
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Transcription resource to fetch.
Return Type
deleteRecordingTranscription
function deleteRecordingTranscription(string recordingSid, string sid, string? accountSid) returns Response|error
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Transcription resource to delete.
listRecordingTranscription
function listRecordingTranscription(string recordingSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListRecordingTranscriptionResponse|error
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchShortCode
function fetchShortCode(string sid, string? accountSid) returns Short_code|error
Fetch an instance of a short code
Parameters
- sid string - The Twilio-provided string that uniquely identifies the ShortCode resource to fetch
Return Type
- Short_code|error - OK
updateShortCode
function updateShortCode(string sid, UpdateShortCodeRequest payload, string? accountSid) returns Short_code|error
Update a short code with the following parameters
Parameters
- sid string - The Twilio-provided string that uniquely identifies the ShortCode resource to update
- payload UpdateShortCodeRequest -
Return Type
- Short_code|error - OK
listShortCode
function listShortCode(string? friendlyName, string? shortCode, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListShortCodeResponse|error
Retrieve a list of short-codes belonging to the account used to make the request
Parameters
- friendlyName string? (default ()) - The string that identifies the ShortCode resources to read.
- shortCode string? (default ()) - Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchSigningKey
function fetchSigningKey(string sid, string? accountSid) returns Signing_key|error
Return Type
- Signing_key|error - OK
updateSigningKey
function updateSigningKey(string sid, UpdateSigningKeyRequest payload, string? accountSid) returns Signing_key|error
Return Type
- Signing_key|error - OK
deleteSigningKey
listSipAuthCallsCredentialListMapping
function listSipAuthCallsCredentialListMapping(string domainSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSipAuthCallsCredentialListMappingResponse|error
Retrieve a list of credential list mappings belonging to the domain used in the request
Parameters
- domainSid string - The SID of the SIP domain that contains the resources to read.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createSipAuthCallsCredentialListMapping
function createSipAuthCallsCredentialListMapping(string domainSid, CreateSipAuthCallsCredentialListMappingRequest payload, string? accountSid) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping|error
Create a new credential list mapping resource
Parameters
- domainSid string - The SID of the SIP domain that will contain the new resource.
Return Type
fetchSipAuthCallsCredentialListMapping
function fetchSipAuthCallsCredentialListMapping(string domainSid, string sid, string? accountSid) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_credential_list_mapping|error
Fetch a specific instance of a credential list mapping
Parameters
- domainSid string - The SID of the SIP domain that contains the resource to fetch.
- sid string - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch.
deleteSipAuthCallsCredentialListMapping
function deleteSipAuthCallsCredentialListMapping(string domainSid, string sid, string? accountSid) returns Response|error
Delete a credential list mapping from the requested domain
Parameters
- domainSid string - The SID of the SIP domain that contains the resource to delete.
- sid string - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete.
listSipAuthCallsIpAccessControlListMapping
function listSipAuthCallsIpAccessControlListMapping(string domainSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSipAuthCallsIpAccessControlListMappingResponse|error
Retrieve a list of IP Access Control List mappings belonging to the domain used in the request
Parameters
- domainSid string - The SID of the SIP domain that contains the resources to read.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createSipAuthCallsIpAccessControlListMapping
function createSipAuthCallsIpAccessControlListMapping(string domainSid, CreateSipAuthCallsIpAccessControlListMappingRequest payload, string? accountSid) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping|error
Create a new IP Access Control List mapping
Parameters
- domainSid string - The SID of the SIP domain that will contain the new resource.
Return Type
fetchSipAuthCallsIpAccessControlListMapping
function fetchSipAuthCallsIpAccessControlListMapping(string domainSid, string sid, string? accountSid) returns SipSip_domainSip_authSip_auth_callsSip_auth_calls_ip_access_control_list_mapping|error
Fetch a specific instance of an IP Access Control List mapping
Parameters
- domainSid string - The SID of the SIP domain that contains the resource to fetch.
- sid string - The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to fetch.
Return Type
deleteSipAuthCallsIpAccessControlListMapping
function deleteSipAuthCallsIpAccessControlListMapping(string domainSid, string sid, string? accountSid) returns Response|error
Delete an IP Access Control List mapping from the requested domain
Parameters
- domainSid string - The SID of the SIP domain that contains the resources to delete.
- sid string - The Twilio-provided string that uniquely identifies the IpAccessControlListMapping resource to delete.
listSipAuthRegistrationsCredentialListMapping
function listSipAuthRegistrationsCredentialListMapping(string domainSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSipAuthRegistrationsCredentialListMappingResponse|error
Retrieve a list of credential list mappings belonging to the domain used in the request
Parameters
- domainSid string - The SID of the SIP domain that contains the resources to read.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createSipAuthRegistrationsCredentialListMapping
function createSipAuthRegistrationsCredentialListMapping(string domainSid, CreateSipAuthRegistrationsCredentialListMappingRequest payload, string? accountSid) returns SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping|error
Create a new credential list mapping resource
Parameters
- domainSid string - The SID of the SIP domain that will contain the new resource.
Return Type
fetchSipAuthRegistrationsCredentialListMapping
function fetchSipAuthRegistrationsCredentialListMapping(string domainSid, string sid, string? accountSid) returns SipSip_domainSip_authSip_auth_registrationsSip_auth_registrations_credential_list_mapping|error
Fetch a specific instance of a credential list mapping
Parameters
- domainSid string - The SID of the SIP domain that contains the resource to fetch.
- sid string - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to fetch.
Return Type
deleteSipAuthRegistrationsCredentialListMapping
function deleteSipAuthRegistrationsCredentialListMapping(string domainSid, string sid, string? accountSid) returns Response|error
Delete a credential list mapping from the requested domain
Parameters
- domainSid string - The SID of the SIP domain that contains the resources to delete.
- sid string - The Twilio-provided string that uniquely identifies the CredentialListMapping resource to delete.
listSipCredential
function listSipCredential(string credentialListSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSipCredentialResponse|error
Retrieve a list of credentials.
Parameters
- credentialListSid string - The unique id that identifies the credential list that contains the desired credentials.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
Return Type
createSipCredential
function createSipCredential(string credentialListSid, CreateSipCredentialRequest payload, string? accountSid) returns SipSip_credential_listSip_credential|error
Create a new credential resource.
Parameters
- credentialListSid string - The unique id that identifies the credential list to include the created credential.
- payload CreateSipCredentialRequest -
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
Return Type
- SipSip_credential_listSip_credential|error - Created
fetchSipCredential
function fetchSipCredential(string credentialListSid, string sid, string? accountSid) returns SipSip_credential_listSip_credential|error
Fetch a single credential.
Parameters
- credentialListSid string - The unique id that identifies the credential list that contains the desired credential.
- sid string - The unique id that identifies the resource to fetch.
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
Return Type
updateSipCredential
function updateSipCredential(string credentialListSid, string sid, UpdateSipCredentialRequest payload, string? accountSid) returns SipSip_credential_listSip_credential|error
Update a credential resource.
Parameters
- credentialListSid string - The unique id that identifies the credential list that includes this credential.
- sid string - The unique id that identifies the resource to update.
- payload UpdateSipCredentialRequest -
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
Return Type
deleteSipCredential
function deleteSipCredential(string credentialListSid, string sid, string? accountSid) returns Response|error
Delete a credential resource.
Parameters
- credentialListSid string - The unique id that identifies the credential list that contains the desired credentials.
- sid string - The unique id that identifies the resource to delete.
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
listSipCredentialList
function listSipCredentialList(int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSipCredentialListResponse|error
Get All Credential Lists
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
Return Type
createSipCredentialList
function createSipCredentialList(CreateSipCredentialListRequest payload, string? accountSid) returns SipSip_credential_list|error
Create a Credential List
Parameters
- payload CreateSipCredentialListRequest -
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
Return Type
- SipSip_credential_list|error - Created
fetchSipCredentialList
function fetchSipCredentialList(string sid, string? accountSid) returns SipSip_credential_list|error
Get a Credential List
Parameters
- sid string - The credential list Sid that uniquely identifies this resource
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
Return Type
updateSipCredentialList
function updateSipCredentialList(string sid, UpdateSipCredentialListRequest payload, string? accountSid) returns SipSip_credential_list|error
Update a Credential List
Parameters
- sid string - The credential list Sid that uniquely identifies this resource
- payload UpdateSipCredentialListRequest -
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
Return Type
deleteSipCredentialList
Delete a Credential List
Parameters
- sid string - The credential list Sid that uniquely identifies this resource
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
listSipCredentialListMapping
function listSipCredentialListMapping(string domainSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSipCredentialListMappingResponse|error
Read multiple CredentialListMapping resources from an account.
Parameters
- domainSid string - A 34 character string that uniquely identifies the SIP Domain that includes the resource to read.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createSipCredentialListMapping
function createSipCredentialListMapping(string domainSid, CreateSipCredentialListMappingRequest payload, string? accountSid) returns SipSip_domainSip_credential_list_mapping|error
Create a CredentialListMapping resource for an account.
Parameters
- domainSid string - A 34 character string that uniquely identifies the SIP Domain for which the CredentialList resource will be mapped.
- payload CreateSipCredentialListMappingRequest -
Return Type
fetchSipCredentialListMapping
function fetchSipCredentialListMapping(string domainSid, string sid, string? accountSid) returns SipSip_domainSip_credential_list_mapping|error
Fetch a single CredentialListMapping resource from an account.
Parameters
- domainSid string - A 34 character string that uniquely identifies the SIP Domain that includes the resource to fetch.
- sid string - A 34 character string that uniquely identifies the resource to fetch.
Return Type
deleteSipCredentialListMapping
function deleteSipCredentialListMapping(string domainSid, string sid, string? accountSid) returns Response|error
Delete a CredentialListMapping resource from an account.
Parameters
- domainSid string - A 34 character string that uniquely identifies the SIP Domain that includes the resource to delete.
- sid string - A 34 character string that uniquely identifies the resource to delete.
listSipDomain
function listSipDomain(int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSipDomainResponse|error
Retrieve a list of domains belonging to the account used to make the request
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createSipDomain
function createSipDomain(CreateSipDomainRequest payload, string? accountSid) returns SipSip_domain|error
Create a new Domain
Parameters
- payload CreateSipDomainRequest -
Return Type
- SipSip_domain|error - Created
fetchSipDomain
function fetchSipDomain(string sid, string? accountSid) returns SipSip_domain|error
Fetch an instance of a Domain
Parameters
- sid string - The Twilio-provided string that uniquely identifies the SipDomain resource to fetch.
Return Type
- SipSip_domain|error - OK
updateSipDomain
function updateSipDomain(string sid, UpdateSipDomainRequest payload, string? accountSid) returns SipSip_domain|error
Update the attributes of a domain
Parameters
- sid string - The Twilio-provided string that uniquely identifies the SipDomain resource to update.
- payload UpdateSipDomainRequest -
Return Type
- SipSip_domain|error - OK
deleteSipDomain
Delete an instance of a Domain
Parameters
- sid string - The Twilio-provided string that uniquely identifies the SipDomain resource to delete.
listSipIpAccessControlList
function listSipIpAccessControlList(int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSipIpAccessControlListResponse|error
Retrieve a list of IpAccessControlLists that belong to the account used to make the request
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createSipIpAccessControlList
function createSipIpAccessControlList(CreateSipIpAccessControlListRequest payload, string? accountSid) returns SipSip_ip_access_control_list|error
Create a new IpAccessControlList resource
Parameters
- payload CreateSipIpAccessControlListRequest -
Return Type
- SipSip_ip_access_control_list|error - Created
fetchSipIpAccessControlList
function fetchSipIpAccessControlList(string sid, string? accountSid) returns SipSip_ip_access_control_list|error
Fetch a specific instance of an IpAccessControlList
Parameters
- sid string - A 34 character string that uniquely identifies the resource to fetch.
Return Type
updateSipIpAccessControlList
function updateSipIpAccessControlList(string sid, UpdateSipIpAccessControlListRequest payload, string? accountSid) returns SipSip_ip_access_control_list|error
Rename an IpAccessControlList
Parameters
- sid string - A 34 character string that uniquely identifies the resource to udpate.
- payload UpdateSipIpAccessControlListRequest -
Return Type
deleteSipIpAccessControlList
Delete an IpAccessControlList from the requested account
Parameters
- sid string - A 34 character string that uniquely identifies the resource to delete.
fetchSipIpAccessControlListMapping
function fetchSipIpAccessControlListMapping(string domainSid, string sid, string? accountSid) returns SipSip_domainSip_ip_access_control_list_mapping|error
Fetch an IpAccessControlListMapping resource.
Parameters
- domainSid string - A 34 character string that uniquely identifies the SIP domain.
- sid string - A 34 character string that uniquely identifies the resource to fetch.
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
Return Type
deleteSipIpAccessControlListMapping
function deleteSipIpAccessControlListMapping(string domainSid, string sid, string? accountSid) returns Response|error
Delete an IpAccessControlListMapping resource.
Parameters
- domainSid string - A 34 character string that uniquely identifies the SIP domain.
- sid string - A 34 character string that uniquely identifies the resource to delete.
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
listSipIpAccessControlListMapping
function listSipIpAccessControlListMapping(string domainSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSipIpAccessControlListMappingResponse|error
Retrieve a list of IpAccessControlListMapping resources.
Parameters
- domainSid string - A 34 character string that uniquely identifies the SIP domain.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
Return Type
createSipIpAccessControlListMapping
function createSipIpAccessControlListMapping(string domainSid, CreateSipIpAccessControlListMappingRequest payload, string? accountSid) returns SipSip_domainSip_ip_access_control_list_mapping|error
Create a new IpAccessControlListMapping resource.
Parameters
- domainSid string - A 34 character string that uniquely identifies the SIP domain.
- accountSid string? (default ()) - The unique id of the Account that is responsible for this resource.
Return Type
listSipIpAddress
function listSipIpAddress(string ipAccessControlListSid, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSipIpAddressResponse|error
Read multiple IpAddress resources.
Parameters
- ipAccessControlListSid string - The IpAccessControlList Sid that identifies the IpAddress resources to read.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createSipIpAddress
function createSipIpAddress(string ipAccessControlListSid, CreateSipIpAddressRequest payload, string? accountSid) returns SipSip_ip_access_control_listSip_ip_address|error
Create a new IpAddress resource.
Parameters
- ipAccessControlListSid string - The IpAccessControlList Sid with which to associate the created IpAddress resource.
- payload CreateSipIpAddressRequest -
Return Type
fetchSipIpAddress
function fetchSipIpAddress(string ipAccessControlListSid, string sid, string? accountSid) returns SipSip_ip_access_control_listSip_ip_address|error
Read one IpAddress resource.
Parameters
- ipAccessControlListSid string - The IpAccessControlList Sid that identifies the IpAddress resources to fetch.
- sid string - A 34 character string that uniquely identifies the IpAddress resource to fetch.
Return Type
updateSipIpAddress
function updateSipIpAddress(string ipAccessControlListSid, string sid, UpdateSipIpAddressRequest payload, string? accountSid) returns SipSip_ip_access_control_listSip_ip_address|error
Update an IpAddress resource.
Parameters
- ipAccessControlListSid string - The IpAccessControlList Sid that identifies the IpAddress resources to update.
- sid string - A 34 character string that identifies the IpAddress resource to update.
- payload UpdateSipIpAddressRequest -
Return Type
deleteSipIpAddress
function deleteSipIpAddress(string ipAccessControlListSid, string sid, string? accountSid) returns Response|error
Delete an IpAddress resource.
Parameters
- ipAccessControlListSid string - The IpAccessControlList Sid that identifies the IpAddress resources to delete.
- sid string - A 34 character string that uniquely identifies the resource to delete.
createSiprec
function createSiprec(string callSid, CreateSiprecRequest payload, string? accountSid) returns CallSiprec|error
Create a Siprec
Parameters
- payload CreateSiprecRequest -
Return Type
- CallSiprec|error - Created
updateSiprec
function updateSiprec(string callSid, string sid, UpdateSiprecRequest payload, string? accountSid) returns CallSiprec|error
Stop a Siprec using either the SID of the Siprec resource or the name
used when creating the resource
Parameters
- sid string - The SID of the Siprec resource, or the
name
used when creating the resource
- payload UpdateSiprecRequest -
Return Type
- CallSiprec|error - OK
createStream
function createStream(string callSid, CreateStreamRequest payload, string? accountSid) returns CallStream|error
Create a Stream
Parameters
- payload CreateStreamRequest -
Return Type
- CallStream|error - Created
updateStream
function updateStream(string callSid, string sid, UpdateStreamRequest payload, string? accountSid) returns CallStream|error
Stop a Stream using either the SID of the Stream resource or the name
used when creating the resource
Parameters
- sid string - The SID of the Stream resource, or the
name
used when creating the resource
- payload UpdateStreamRequest -
Return Type
- CallStream|error - OK
createToken
function createToken(CreateTokenRequest payload, string? accountSid) returns Token|error
Create a new token for ICE servers
Parameters
- payload CreateTokenRequest -
fetchTranscription
function fetchTranscription(string sid, string? accountSid) returns Transcription|error
Fetch an instance of a Transcription
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Transcription resource to fetch.
Return Type
- Transcription|error - OK
deleteTranscription
Delete a transcription from the account used to make the request
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Transcription resource to delete.
listTranscription
function listTranscription(int? pageSize, int? page, string? pageToken, string? accountSid) returns ListTranscriptionResponse|error
Retrieve a list of transcriptions belonging to the account used to make the request
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listUsageRecord
function listUsageRecord(Usage_record_enum_category? category, string? startDate, string? endDate, boolean? includeSubaccounts, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListUsageRecordResponse|error
Retrieve a list of usage-records belonging to the account used to make the request
Parameters
- category Usage_record_enum_category? (default ()) - The usage category of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
- startDate string? (default ()) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:-30days
, which will set the start date to be 30 days before the current date.
- endDate string? (default ()) - Only include usage that occurred on or before this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:+30days
, which will set the end date to 30 days from the current date.
- includeSubaccounts boolean? (default ()) - Whether to include usage from the master account and all its subaccounts. Can be:
true
(the default) to include usage from the master account and all subaccounts orfalse
to retrieve usage from only the specified account.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listUsageRecordAllTime
function listUsageRecordAllTime(Usage_record_all_time_enum_category? category, string? startDate, string? endDate, boolean? includeSubaccounts, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListUsageRecordAllTimeResponse|error
Parameters
- category Usage_record_all_time_enum_category? (default ()) - The usage category of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
- startDate string? (default ()) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:-30days
, which will set the start date to be 30 days before the current date.
- endDate string? (default ()) - Only include usage that occurred on or before this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:+30days
, which will set the end date to 30 days from the current date.
- includeSubaccounts boolean? (default ()) - Whether to include usage from the master account and all its subaccounts. Can be:
true
(the default) to include usage from the master account and all subaccounts orfalse
to retrieve usage from only the specified account.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listUsageRecordDaily
function listUsageRecordDaily(Usage_record_daily_enum_category? category, string? startDate, string? endDate, boolean? includeSubaccounts, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListUsageRecordDailyResponse|error
Parameters
- category Usage_record_daily_enum_category? (default ()) - The usage category of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
- startDate string? (default ()) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:-30days
, which will set the start date to be 30 days before the current date.
- endDate string? (default ()) - Only include usage that occurred on or before this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:+30days
, which will set the end date to 30 days from the current date.
- includeSubaccounts boolean? (default ()) - Whether to include usage from the master account and all its subaccounts. Can be:
true
(the default) to include usage from the master account and all subaccounts orfalse
to retrieve usage from only the specified account.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listUsageRecordLastMonth
function listUsageRecordLastMonth(Usage_record_last_month_enum_category? category, string? startDate, string? endDate, boolean? includeSubaccounts, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListUsageRecordLastMonthResponse|error
Parameters
- category Usage_record_last_month_enum_category? (default ()) - The usage category of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
- startDate string? (default ()) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:-30days
, which will set the start date to be 30 days before the current date.
- endDate string? (default ()) - Only include usage that occurred on or before this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:+30days
, which will set the end date to 30 days from the current date.
- includeSubaccounts boolean? (default ()) - Whether to include usage from the master account and all its subaccounts. Can be:
true
(the default) to include usage from the master account and all subaccounts orfalse
to retrieve usage from only the specified account.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listUsageRecordMonthly
function listUsageRecordMonthly(Usage_record_monthly_enum_category? category, string? startDate, string? endDate, boolean? includeSubaccounts, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListUsageRecordMonthlyResponse|error
Parameters
- category Usage_record_monthly_enum_category? (default ()) - The usage category of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
- startDate string? (default ()) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:-30days
, which will set the start date to be 30 days before the current date.
- endDate string? (default ()) - Only include usage that occurred on or before this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:+30days
, which will set the end date to 30 days from the current date.
- includeSubaccounts boolean? (default ()) - Whether to include usage from the master account and all its subaccounts. Can be:
true
(the default) to include usage from the master account and all subaccounts orfalse
to retrieve usage from only the specified account.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listUsageRecordThisMonth
function listUsageRecordThisMonth(Usage_record_this_month_enum_category? category, string? startDate, string? endDate, boolean? includeSubaccounts, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListUsageRecordThisMonthResponse|error
Parameters
- category Usage_record_this_month_enum_category? (default ()) - The usage category of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
- startDate string? (default ()) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:-30days
, which will set the start date to be 30 days before the current date.
- endDate string? (default ()) - Only include usage that occurred on or before this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:+30days
, which will set the end date to 30 days from the current date.
- includeSubaccounts boolean? (default ()) - Whether to include usage from the master account and all its subaccounts. Can be:
true
(the default) to include usage from the master account and all subaccounts orfalse
to retrieve usage from only the specified account.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listUsageRecordToday
function listUsageRecordToday(Usage_record_today_enum_category? category, string? startDate, string? endDate, boolean? includeSubaccounts, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListUsageRecordTodayResponse|error
Parameters
- category Usage_record_today_enum_category? (default ()) - The usage category of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
- startDate string? (default ()) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:-30days
, which will set the start date to be 30 days before the current date.
- endDate string? (default ()) - Only include usage that occurred on or before this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:+30days
, which will set the end date to 30 days from the current date.
- includeSubaccounts boolean? (default ()) - Whether to include usage from the master account and all its subaccounts. Can be:
true
(the default) to include usage from the master account and all subaccounts orfalse
to retrieve usage from only the specified account.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listUsageRecordYearly
function listUsageRecordYearly(Usage_record_yearly_enum_category? category, string? startDate, string? endDate, boolean? includeSubaccounts, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListUsageRecordYearlyResponse|error
Parameters
- category Usage_record_yearly_enum_category? (default ()) - The usage category of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
- startDate string? (default ()) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:-30days
, which will set the start date to be 30 days before the current date.
- endDate string? (default ()) - Only include usage that occurred on or before this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:+30days
, which will set the end date to 30 days from the current date.
- includeSubaccounts boolean? (default ()) - Whether to include usage from the master account and all its subaccounts. Can be:
true
(the default) to include usage from the master account and all subaccounts orfalse
to retrieve usage from only the specified account.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
listUsageRecordYesterday
function listUsageRecordYesterday(Usage_record_yesterday_enum_category? category, string? startDate, string? endDate, boolean? includeSubaccounts, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListUsageRecordYesterdayResponse|error
Parameters
- category Usage_record_yesterday_enum_category? (default ()) - The usage category of the UsageRecord resources to read. Only UsageRecord resources in the specified category are retrieved.
- startDate string? (default ()) - Only include usage that has occurred on or after this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:-30days
, which will set the start date to be 30 days before the current date.
- endDate string? (default ()) - Only include usage that occurred on or before this date. Specify the date in GMT and format as
YYYY-MM-DD
. You can also specify offsets from the current date, such as:+30days
, which will set the end date to 30 days from the current date.
- includeSubaccounts boolean? (default ()) - Whether to include usage from the master account and all its subaccounts. Can be:
true
(the default) to include usage from the master account and all subaccounts orfalse
to retrieve usage from only the specified account.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
fetchUsageTrigger
function fetchUsageTrigger(string sid, string? accountSid) returns UsageUsage_trigger|error
Fetch and instance of a usage-trigger
Parameters
- sid string - The Twilio-provided string that uniquely identifies the UsageTrigger resource to fetch.
Return Type
- UsageUsage_trigger|error - OK
updateUsageTrigger
function updateUsageTrigger(string sid, UpdateUsageTriggerRequest payload, string? accountSid) returns UsageUsage_trigger|error
Update an instance of a usage trigger
Parameters
- sid string - The Twilio-provided string that uniquely identifies the UsageTrigger resource to update.
- payload UpdateUsageTriggerRequest -
Return Type
- UsageUsage_trigger|error - OK
deleteUsageTrigger
Parameters
- sid string - The Twilio-provided string that uniquely identifies the UsageTrigger resource to delete.
listUsageTrigger
function listUsageTrigger(Usage_trigger_enum_recurring? recurring, Usage_trigger_enum_trigger_field? triggerBy, Usage_trigger_enum_usage_category? usageCategory, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListUsageTriggerResponse|error
Retrieve a list of usage-triggers belonging to the account used to make the request
Parameters
- recurring Usage_trigger_enum_recurring? (default ()) - The frequency of recurring UsageTriggers to read. Can be:
daily
,monthly
, oryearly
to read recurring UsageTriggers. An empty value or a value ofalltime
reads non-recurring UsageTriggers.
- triggerBy Usage_trigger_enum_trigger_field? (default ()) - The trigger field of the UsageTriggers to read. Can be:
count
,usage
, orprice
as described in the UsageRecords documentation.
- usageCategory Usage_trigger_enum_usage_category? (default ()) - The usage category of the UsageTriggers to read. Must be a supported usage categories.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default () ) - The page token. This is provided by the API.
Return Type
createUsageTrigger
function createUsageTrigger(CreateUsageTriggerRequest payload, string? accountSid) returns UsageUsage_trigger|error
Create a new UsageTrigger
Parameters
- payload CreateUsageTriggerRequest -
Return Type
- UsageUsage_trigger|error - Created
createUserDefinedMessage
function createUserDefinedMessage(string callSid, CreateUserDefinedMessageRequest payload, string? accountSid) returns CallUser_defined_message|error
Create a new User Defined Message for the given Call SID.
Parameters
- payload CreateUserDefinedMessageRequest -
Return Type
- CallUser_defined_message|error - Created
createUserDefinedMessageSubscription
function createUserDefinedMessageSubscription(string callSid, CreateUserDefinedMessageSubscriptionRequest payload, string? accountSid) returns CallUser_defined_message_subscription|error
Subscribe to User Defined Messages for a given Call SID.
Parameters
Return Type
- CallUser_defined_message_subscription|error - Created
deleteUserDefinedMessageSubscription
function deleteUserDefinedMessageSubscription(string callSid, string sid, string? accountSid) returns Response|error
Delete a specific User Defined Message Subscription.
twilio: GeneratedClient
This is the public Twilio REST API.
Constructor
Gets invoked to initialize the connector
.
init (ConnectionConfig config, string serviceUrl)
- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.twilio.com" - URL of the target service
listAccount
function listAccount(string? friendlyName, Account_enum_status? status, int? pageSize, int? page, string? pageToken) returns ListAccountResponse|error
Retrieves a collection of Accounts belonging to the account used to make the request
Parameters
- friendlyName string? (default ()) - Only return the Account resources with friendly names that exactly match this name.
- status Account_enum_status? (default ()) - Only return Account resources with the given status. Can be
closed
,suspended
oractive
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
- ListAccountResponse|error - OK
createAccount
function createAccount(CreateAccountRequest payload) returns Account|error
Create a new Twilio Subaccount from the account making the request
Parameters
- payload CreateAccountRequest -
fetchAccount
Fetch the account specified by the provided Account Sid
Parameters
- sid string - The Account Sid that uniquely identifies the account to fetch
updateAccount
function updateAccount(string sid, UpdateAccountRequest payload) returns Account|error
Modify the properties of a given Account
Parameters
- sid string - The Account Sid that uniquely identifies the account to update
- payload UpdateAccountRequest -
listAddress
function listAddress(string accountSid, string? customerName, string? friendlyName, string? isoCountry, int? pageSize, int? page, string? pageToken) returns ListAddressResponse|error
Parameters
- customerName string? (default ()) - The
customer_name
of the Address resources to read.
- friendlyName string? (default ()) - The string that identifies the Address resources to read.
- isoCountry string? (default ()) - The ISO country code of the Address resources to read.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
- ListAddressResponse|error - OK
createAddress
function createAddress(string accountSid, CreateAddressRequest payload) returns Address|error
Parameters
- payload CreateAddressRequest -
fetchAddress
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Address resource to fetch.
updateAddress
function updateAddress(string accountSid, string sid, UpdateAddressRequest payload) returns Address|error
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Address resource to update.
- payload UpdateAddressRequest -
deleteAddress
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Address resource to delete.
listApplication
function listApplication(string accountSid, string? friendlyName, int? pageSize, int? page, string? pageToken) returns ListApplicationResponse|error
Retrieve a list of applications representing an application within the requesting account
Parameters
- friendlyName string? (default ()) - The string that identifies the Application resources to read.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
createApplication
function createApplication(string accountSid, CreateApplicationRequest payload) returns Application|error
Create a new application within your account
Parameters
- payload CreateApplicationRequest -
Return Type
- Application|error - Created
fetchApplication
function fetchApplication(string accountSid, string sid) returns Application|error
Fetch the application specified by the provided sid
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Application resource to fetch.
Return Type
- Application|error - OK
updateApplication
function updateApplication(string accountSid, string sid, UpdateApplicationRequest payload) returns Application|error
Updates the application's properties
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Application resource to update.
- payload UpdateApplicationRequest -
Return Type
- Application|error - OK
deleteApplication
Delete the application by the specified application sid
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Application resource to delete.
fetchAuthorizedConnectApp
function fetchAuthorizedConnectApp(string accountSid, string connectAppSid) returns Authorized_connect_app|error
Fetch an instance of an authorized-connect-app
Parameters
- connectAppSid string - The SID of the Connect App to fetch.
Return Type
listAuthorizedConnectApp
function listAuthorizedConnectApp(string accountSid, int? pageSize, int? page, string? pageToken) returns ListAuthorizedConnectAppResponse|error
Retrieve a list of authorized-connect-apps belonging to the account used to make the request
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberCountry
function listAvailablePhoneNumberCountry(string accountSid, int? pageSize, int? page, string? pageToken) returns ListAvailablePhoneNumberCountryResponse|error
Parameters
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
fetchAvailablePhoneNumberCountry
function fetchAvailablePhoneNumberCountry(string accountSid, string countryCode) returns Available_phone_number_country|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country to fetch available phone number information about.
Return Type
listAvailablePhoneNumberLocal
function listAvailablePhoneNumberLocal(string accountSid, string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken) returns ListAvailablePhoneNumberLocalResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberMachineToMachine
function listAvailablePhoneNumberMachineToMachine(string accountSid, string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken) returns ListAvailablePhoneNumberMachineToMachineResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberMobile
function listAvailablePhoneNumberMobile(string accountSid, string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken) returns ListAvailablePhoneNumberMobileResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberNational
function listAvailablePhoneNumberNational(string accountSid, string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken) returns ListAvailablePhoneNumberNationalResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberSharedCost
function listAvailablePhoneNumberSharedCost(string accountSid, string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken) returns ListAvailablePhoneNumberSharedCostResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberTollFree
function listAvailablePhoneNumberTollFree(string accountSid, string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken) returns ListAvailablePhoneNumberTollFreeResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the maximum is 1000.
- page int? (default ()) - The page index. This value is simply for client state.
- pageToken string? (default ()) - The page token. This is provided by the API.
Return Type
listAvailablePhoneNumberVoip
function listAvailablePhoneNumberVoip(string accountSid, string countryCode, int? areaCode, string? contains, boolean? smsEnabled, boolean? mmsEnabled, boolean? voiceEnabled, boolean? excludeAllAddressRequired, boolean? excludeLocalAddressRequired, boolean? excludeForeignAddressRequired, boolean? beta, string? nearNumber, string? nearLatLong, int? distance, string? inPostalCode, string? inRegion, string? inRateCenter, string? inLata, string? inLocality, boolean? faxEnabled, int? pageSize, int? page, string? pageToken) returns ListAvailablePhoneNumberVoipResponse|error
Parameters
- countryCode string - The ISO-3166-1 country code of the country from which to read phone numbers.
- areaCode int? (default ()) - The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
- smsEnabled boolean? (default ()) - Whether the phone numbers can receive text messages. Can be:
true
orfalse
.
- mmsEnabled boolean? (default ()) - Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
.
- voiceEnabled boolean? (default ()) - Whether the phone numbers can receive calls. Can be:
true
orfalse
.
- beta boolean? (default ()) - Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
.
- nearNumber string? (default ()) - Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada.
- nearLatLong string? (default ()) - Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada.
- distance int? (default ()) - The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada.
- inPostalCode string? (default ()) - Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada.
- inRegion string? (default ()) - Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada.
- inRateCenter string? (default ()) - Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada.
- inLocality string? (default ()) - Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
- faxEnabled boolean? (default ()) - Whether the phone numbers can receive faxes. Can be:
true
orfalse
.
- pageSize int? (default ()) - How many resources to return in each list page. The default is 50, and the ma