twilio
Module twilio
API
Definitions
ballerinax/twilio Ballerina library
Overview
Twilio is a cloud communications platform that allows software developers to programmatically make and receive phone calls, send and receive text messages, and perform other communication functions using its web service APIs.
The Ballerina Twilio connector supports the Twilio Basic API version 2010-04-01, enabling users to leverage these communication capabilities within their Ballerina applications.
Setup guide
Before using the ballerinax-twilio connector you must have access to Twilio API, If you do not have access to Twilio API please complete the following steps:
Step 1: Create a Twilio account
Creating a Twilio account can be done by visiting Twilio and clicking the "Try Twilio for Free" button.
Step 2: Obtain a Twilio phone number
All trial projects can provision a free trial phone number for testing. Here's how to get started.
Notice: Trial project phone number selection may be limited. You must upgrade your Twilio project to provision more than one phone number, or to provision a number that is not available to trial projects.
- Access the Buy a Number page in the Console.
- Enter the criteria for the phone number you need, and then click Search.
- Country: Select the desired country from the drop-down menu.
- Number or Location: Select the desired option to search by digits/phrases, or a specific City or Region.
- Capabilities: Select your service needs for this number.
- Click Buy to purchase a phone number for your current project or sub-account.
Notice: Many countries require identity documentation for Phone Number compliance. Requests to provision phone numbers with these regulations will be required to select or add the required documentation after clicking Buy in Console. To see which countries and phone number types are affected by these requirements, please see twilio's Phone Number Regulations site.
Step 3: Obtain a Twilio API Key, API Secret with Account SID
You can find API Keys related information under API keys & tokens section in your Twilio account. If you do not have an API Key and a Secret, please complete the following steps:
- Access the API keys & tokens page in your Twilio account, and then click on Create API key.
- Enter the criteria for the API Key you need, and then click Create.
- Friendly name: Enter a human-readable name for your API key. It helps you identify the key later, especially if you have multiple API keys.
- Region: Enter the geographical region where the API key will be used.
- Key type: There are different types of API keys you can create,
- Standard: Provides access to all Twilio API functionalities except for managing API keys and configuring accounts and subaccounts.
- Main: Offers the same access as standard keys but also allows managing API keys and configuring accounts and subaccounts.
- Restricted: Allows fine-grained access to specific Twilio API resources, enabling you to set permissions for different API endpoints
- Save the API key SID and the Secret in a safe place to use in your application.
Important: This secret is only shown once. Please make note of it and store it in a safe and a secure location.
- In order to obtain the Account SID of your Twilio account, you can visit your Twilio console.
Quickstart
To use the twilio
connector in your Ballerina application, modify the .bal
file as follows:
Step 1 - Import the module
Import the Twilio module 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 apiKey = ?; configurable string apiSecret = ?; configurable string accountSid = ?; twilio:ConnectionConfig twilioConfig = { auth: { apiKey, apiSecret, accountSid } }; twilio:Client twilio = check new (twilioConfig);
Step 3 - Invoke the connector operation
Invoke the sending SMS operation using the client as shown below:
public function main() returns error? { twilio:CreateMessageRequest messageRequest = { To: "+XXXXXXXXXXX", // Phone number that you want to send the message to From: "+XXXXXXXXXXX", // Twilio phone number Body: "Hello from Ballerina" }; twilio:Message response = check twilio->createMessage(messageRequest); // Print the status of the message from the response io:println("Message Status: ", response?.status); }
Step 4: Run the Ballerina application
Execute the command below to execute the Ballerina application:
bal run
Examples
The Twilio connector comes equipped with examples that demonstrate its usage across various scenarios. These examples are conveniently organized into three distinct groups based on the functionalities they showcase. For a more hands-on experience and a deeper understanding of these capabilities, we encourage you to experiment with the provided examples in your development environment.
- Account management
- Create a sub-account - Create a subaccount under a Twilio account
- Fetch an account - Get details of a Twilio account
- Fetch balance - Get the balance of a Twilio account
- List accounts - List all subaccounts under a Twilio account
- Update an account - Update the name of a Twilio account
- Call management
- Make a call - Make a call to a phone number via a Twilio
- Fetch call log - Get details of a call made via a Twilio
- List call logs - Get details of all calls made via a Twilio
- Delete a call log - Delete the log of a call made via Twilio
- Message management
- Send an SMS message - Send an SMS to a phone number via a Twilio
- Send a Whatsapp message - Send a Whatsapp message to a phone number via a Twilio
- List message logs - Get details of all messages sent via a Twilio
- Fetch a message log - Get details of a message sent via a Twilio
- Delete a message log - Delete a message log via a Twilio
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 - The
CreateAccountRequest
record should be used as a payload to create a Subaccount.
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 - The
UpdateAccountRequest
record should be used as a payload to update an Account.
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 - The
CreateAddressRequest
record should be used as a payload to create a new Address resource.
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 - The
UpdateAddressRequest
record should be used as a payload to update an Address resource.
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 - The
CreateApplicationRequest
record should be used as a payload to create a new Application resource.
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 - The
UpdateApplicationRequest
record should be used as a payload to update an Application resource.
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
List contries that have available for phone numbers
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
Fetch an available phone number by country code
Parameters
- countryCode string - The ISO-3166-1 country code of the country to fetch available phone numbers 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
List available phone numbers (local)
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
List available phone numbers (MachineToMachine)
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
List available phone numbers (Mobile)
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
List available phone numbers (National)
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
List available phone numbers (SharedCost)
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
List available phone numbers (TollFree)
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
List available phone numbers (Voip)
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 - The
CrateCallRequest
record should be used as a payload to create a call.
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 - The
UpdateCallRequest
record should be used as a payload to update a call.
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 - The
UpdateCallFeedbackRequest
record should be used as a payload to update a feedback.
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 - The
CreateCallFeedbackSummaryRequest
record should be used as a payload to create a feedback summary.
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
Fetch call notifications for a call
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
List Call Notification associated with a Call
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 - The
CreateCallRecordingRequest
record should be used as a payload to create a recording.
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 - The
UpdateCallRecordingRequest
record should be used as a payload to update a recording.
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
Update a conference
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Conference resource to update
- payload UpdateConferenceRequest - The
UpdateConferenceRequest
record should be used as a payload to update a conference.
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 - The
UpdateConferenceRecordingRequest
record should be used as a payload to update a recording.
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 - The
UpdateConnectAppRequest
record should be used as a payload to update a connect-app.
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
List dependent phone numbers for an address
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 - The
UpdateIncomingPhoneNumberRequest
record should be used as a payload to update a phone number.
- 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 - The
CreateIncomingPhoneNumberRequest
record should be used as a payload to purchase a phone number.
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.
- payload CreateIncomingPhoneNumberAssignedAddOnRequest - The
CreateIncomingPhoneNumberAssignedAddOnRequest
record should be used as a payload to crete an incoming phone number assigned 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
List incoming-phone-numbers local for an address
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
Create a phone-number for the account.
Parameters
- payload CreateIncomingPhoneNumberLocalRequest - The
CreateIncomingPhoneNumberLocalRequest
record should be used as a payload to purchase a phone number.
Return Type
listIncomingPhoneNumberMobile
function listIncomingPhoneNumberMobile(boolean? beta, string? friendlyName, string? phoneNumber, string? origin, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListIncomingPhoneNumberMobileResponse|error
List incoming-phone-numbers mobile for an address
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
Create a phone-number for the account.
Parameters
- payload CreateIncomingPhoneNumberMobileRequest - The
CreateIncomingPhoneNumberMobileRequest
record should be used as a payload to purchase a phone number.
Return Type
listIncomingPhoneNumberTollFree
function listIncomingPhoneNumberTollFree(boolean? beta, string? friendlyName, string? phoneNumber, string? origin, int? pageSize, int? page, string? pageToken, string? accountSid) returns ListIncomingPhoneNumberTollFreeResponse|error
List incoming-phone-numbers troll-free for an address
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
Create a phone-number for the account.
Parameters
- payload CreateIncomingPhoneNumberTollFreeRequest - The
CreateIncomingPhoneNumberTollFreeRequest
record should be used as a payload to purchase a phone number.
Return Type
fetchKey
Fetch key resource
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
Update a Key with the specified parameters
Parameters
- sid string - The Twilio-provided string that uniquely identifies the Key resource to update.
- payload UpdateKeyRequest - The
UpdateKeyRequest
record should be used as a payload to update a key.
deleteKey
Delete a Key resource
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
List of Keys resources.
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
Create a Key for the account.
Parameters
- payload CreateNewKeyRequest - The
CreateKeyRequest
record should be used as a payload to create a key.
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 - The
UpdateMemberRequest
record should be used as a payload to update a member.
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 - The
CreateMessageRequest
record should be used as a payload to send a message.
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)
Parameters
- sid string - The SID of the Message resource to be updated.
- payload UpdateMessageRequest - The
UpdateMessageRequest
record should be used as a payload to update a message.
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 - The
CreateMessageFeedbackRequest
record should be used as a payload to create MessageFeedback.
Return Type
- MessageMessage_feedback|error - Created
listSigningKey
function listSigningKey(int? pageSize, int? page, string? pageToken, string? accountSid) returns ListSigningKeyResponse|error
Fetch a specific MessageFeedback
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
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 - The
CreateNewSigningKeyRequest
record should be used as a payload to create a signing key.
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 - The
UpdateOutgoingCallerIdRequest
record should be used as a payload to update an outgoing caller id.
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(CreateValidationRequest payload, string? accountSid) returns Validation_request|error
Create a new outgoing-caller-id for the account.
Parameters
- payload CreateValidationRequest - The
CreateOutgoingCallerIdRequest
record should be used as a payload to create an outgoing caller id.
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 - The
UpdateParticipantRequest
record should be used as a payload to update a participant.
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
Create a participant in a conference
Parameters
- conferenceSid string - The SID of the participant's conference.
- payload CreateParticipantRequest - The
CreateParticipantRequest
record should be used as a payload to create a participant.
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 - The
CreatePaymentsRequest
record should be used as a payload to create a payments resource.
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 - The
UpdatePaymentsRequest
record should be used as a payload to update a payments resource.
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 - The
UpdateQueueRequest
record should be used as a payload to update a queue.
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 - The
CreateQueueRequest
record should be used as a payload to create a queue.
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
Fetch an instance of a recording transcription
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
Delete a transcription from your account
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
Retrieve a list of transcriptions belonging to the recording
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 - The
UpdateShortCodeRequest
record should be used as a payload to update a short code.
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
Create a short code
Parameters
- sid string - The Twilio-provided string that uniquely identifies the ShortCode resource to update.
Return Type
- Signing_key|error - OK
updateSigningKey
function updateSigningKey(string sid, UpdateSigningKeyRequest payload, string? accountSid) returns Signing_key|error
Update a signing key with the following parameters
Parameters
- sid string - The Twilio-provided string that uniquely identifies the SigningKey resource to update.
- payload UpdateSigningKeyRequest - The
UpdateSigningKeyRequest
record should be used as a payload to update a signing key.
Return Type
- Signing_key|error - OK
deleteSigningKey
Delete a signing key from the account
Parameters
- sid string - The Twilio-provided string that uniquely identifies the SigningKey resource to delete.
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.
- payload CreateSipAuthCallsCredentialListMappingRequest - The
CreateSipAuthCallsCredentialListMappingRequest
record should be used as a payload to create a credential list mapping.
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.
- payload CreateSipAuthCallsIpAccessControlListMappingRequest - The
CreateSipAuthCallsIpAccessControlListMappingRequest
record should be used as a payload to create a IP Access Control List mapping.
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.
- payload CreateSipAuthRegistrationsCredentialListMappingRequest - The
CreateSipAuthRegistrationsCredentialListMappingRequest
record should be used as a payload to create a credential list mapping.
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 - The
CreateSipCredentialRequest
record should be used as a payload to create a credential.
- 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 - The
UpdateSipCredentialRequest
record should be used as a payload to update a credential.
- 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 - The
CreateSipCredentialListRequest
record should be used as a payload to create a credential list.
- 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 - The
UpdateSipCredentialListRequest
record should be used as a payload to update a credential list.
- 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 - The
CreateSipCredentialListMappingRequest
record should be used as a payload to create a CredentialListMapping resource.
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 - The
CreateSipDomainRequest
record should be used as a payload to create a domain.
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 - The
UpdateSipDomainRequest
record should be used as a payload to update a domain.
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 - The
CreateSipIpAccessControlListRequest
record should be used as a payload to create an IpAccessControlList.
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 - The
UpdateSipIpAccessControlListRequest
record should be used as a payload to update an IpAccessControlList.
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.
- payload CreateSipIpAccessControlListMappingRequest - The
CreateSipIpAccessControlListMappingRequest
record should be used as a payload to create an IpAccessControlListMapping resource.
- 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 - The
CreateSipIpAddressRequest
record should be used as a payload to create an IpAddress resource.
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 - The
UpdateSipIpAddressRequest
record should be used as a payload to update an IpAddress resource.
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 - The
CreateSiprecRequest
record should be used as a payload to create a Siprec.
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 - The
UpdateSiprecRequest
record should be used as a payload to update a Siprec.
Return Type
- CallSiprec|error - OK
createStream
function createStream(string callSid, CreateStreamRequest payload, string? accountSid) returns CallStream|error
Create a Stream
Parameters
- payload CreateStreamRequest - The
CreateStreamRequest
record should be used as a payload to create a Stream.
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 - The
UpdateStreamRequest
record should be used as a payload to update a Stream.
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 - The
CreateTokenRequest
record should be used as a payload to create a token.
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
Retrieve a list of usage-records belonging to the account used to make the request
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
Retrieve a list of daily usage-records belonging to the account used to make the request
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
Retrieve a list of last month's usage-records belonging to the account used to make the request
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
Retrieve a list of monthly usage-records belonging to the account used to make the request
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
Retrieve a list of this month's usage-records belonging to the account used to make the request
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
Retrieve a list of today's usage-records belonging to the account used to make the request
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
Retrieve a list of yearly usage-records belonging to the account used to make the request
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
Retrieve a list of yesterday's usage-records belonging to the account used to make the request
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 - The
UpdateUsageTriggerRequest
record should be used as a payload to update a UsageTrigger resource.
Return Type
- UsageUsage_trigger|error - OK
deleteUsageTrigger
Delete a usage-trigger from the account used to make the request
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 - The
CreateUsageTriggerRequest
record should be used as a payload to create a UsageTrigger.
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 - The
CreateUserDefinedMessageRequest
record should be used as a payload to create a User Defined Message.
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
- payload CreateUserDefinedMessageSubscriptionRequest - The
CreateUserDefinedMessageSubscriptionRequest
record should be used as a payload to create a User Defined Message Subscription.
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.
Records
twilio: Account
Fields
- auth_token? string? - The authorization token for this account. This token should be kept a secret, so no sharing.
- date_created? string? - The date that this account was created, in GMT in RFC 2822 format
- date_updated? string? - The date that this account was last updated, in GMT in RFC 2822 format.
- friendly_name? string? - A human readable description of this account, up to 64 characters long. By default the FriendlyName is your email address.
- owner_account_sid? string? - The unique 34 character id that represents the parent of this account. The OwnerAccountSid of a parent account is it's own sid.
- sid? string? - A 34 character string that uniquely identifies this resource.
- status? Account_enum_status -
- subresource_uris? record {}? - A Map of various subresources available for the given Account Instance
- 'type? Account_enum_type -
- uri? string? - The URI for this resource, relative to
https://api.twilio.com
twilio: Address
Fields
- city? string? - The city in which the address is located.
- customer_name? string? - The name associated with the address.This property has a maximum length of 16 4-byte characters, or 21 3-byte characters.
- friendly_name? string? - The string that you assigned to describe the resource.
- iso_country? string? - The ISO country code of the address.
- postal_code? string? - The postal code of the address.
- region? string? - The state or region of the address.
- sid? string? - The unique string that that we created to identify the Address resource.
- street? string? - The number and street address of the address.
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
- emergency_enabled? boolean? - Whether emergency calling has been enabled on this number.
- validated? boolean? - Whether the address has been validated to comply with local regulation. In countries that require valid addresses, an invalid address will not be accepted.
true
indicates the Address has been validated.false
indicate the country doesn't require validation or the Address is not valid.
- verified? boolean? - Whether the address has been verified to comply with regulation. In countries that require valid addresses, an invalid address will not be accepted.
true
indicates the Address has been verified.false
indicate the country doesn't require verified or the Address is not valid.
- street_secondary? string? - The additional number and street address of the address.
twilio: AddressDependent_phone_number
Fields
- sid? string? - The unique string that that we created to identify the DependentPhoneNumber resource.
- friendly_name? string? - The string that you assigned to describe the resource.
- voice_url? string? - The URL we call when the phone number receives a call. The
voice_url
will not be used if avoice_application_sid
or atrunk_sid
is set.
- voice_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method we use to call
voice_url
. Can be:GET
orPOST
.
- voice_fallback_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method we use to call
voice_fallback_url
. Can be:GET
orPOST
.
- voice_fallback_url? string? - The URL that we call when an error occurs retrieving or executing the TwiML requested by
url
.
- voice_caller_id_lookup? boolean? - Whether we look up the caller's caller-ID name from the CNAM database. Can be:
true
orfalse
. Caller ID lookups can cost $0.01 each.
- sms_fallback_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method we use to call
sms_fallback_url
. Can be:GET
orPOST
.
- sms_fallback_url? string? - The URL that we call when an error occurs while retrieving or executing the TwiML from
sms_url
.
- sms_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method we use to call
sms_url
. Can be:GET
orPOST
.
- sms_url? string? - The URL we call when the phone number receives an incoming SMS message.
- address_requirements? Dependent_phone_number_enum_address_requirement -
- capabilities? anydata? - The set of Boolean properties that indicates whether a phone number can receive calls or messages. Capabilities are
Voice
,SMS
, andMMS
and each capability can be:true
orfalse
.
- status_callback? string? - The URL we call using the
status_callback_method
to send status information to your application.
- status_callback_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method we use to call
status_callback
. Can be:GET
orPOST
.
- api_version? string? - The API version used to start a new TwiML session.
- sms_application_sid? string? - The SID of the application that handles SMS messages sent to the phone number. If an
sms_application_sid
is present, we ignore allsms_*_url
values and use those of the application.
- voice_application_sid? string? - The SID of the application that handles calls to the phone number. If a
voice_application_sid
is present, we ignore all of the voice urls and use those set on the application. Setting avoice_application_sid
will automatically delete yourtrunk_sid
and vice versa.
- trunk_sid? string? - The SID of the Trunk that handles calls to the phone number. If a
trunk_sid
is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting atrunk_sid
will automatically delete yourvoice_application_sid
and vice versa.
- emergency_status? Dependent_phone_number_enum_emergency_status -
- emergency_address_sid? string? - The SID of the emergency address configuration that we use for emergency calling from the phone number.
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
twilio: ApiKeyConfig
Twilio API Key Based Authentication configurations.
Fields
- apiKey string - Twilio API key SID
- apiSecret string - Twilio API key Secret
- accountSid string - Twilio account SID
twilio: Application
Fields
- api_version? string? - The API version used to start a new TwiML session.
- friendly_name? string? - The string that you assigned to describe the resource.
- message_status_callback? string? - The URL we call using a POST method to send message status information to your application.
- sid? string? - The unique string that that we created to identify the Application resource.
- sms_fallback_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method we use to call
sms_fallback_url
. Can be:GET
orPOST
.
- sms_fallback_url? string? - The URL that we call when an error occurs while retrieving or executing the TwiML from
sms_url
.
- sms_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method we use to call
sms_url
. Can be:GET
orPOST
.
- sms_status_callback? string? - The URL we call using a POST method to send status information to your application about SMS messages that refer to the application.
- sms_url? string? - The URL we call when the phone number receives an incoming SMS message.
- status_callback? string? - The URL we call using the
status_callback_method
to send status information to your application.
- status_callback_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method we use to call
status_callback
. Can be:GET
orPOST
.
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
- voice_caller_id_lookup? boolean? - Whether we look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be:
true
orfalse
.
- voice_fallback_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method we use to call
voice_fallback_url
. Can be:GET
orPOST
.
- voice_fallback_url? string? - The URL that we call when an error occurs retrieving or executing the TwiML requested by
url
.
- voice_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method we use to call
voice_url
. Can be:GET
orPOST
.
- voice_url? string? - The URL we call when the phone number assigned to this application receives a call.
- public_application_connect_enabled? boolean? - Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be:
true
orfalse
.
twilio: Authorized_connect_app
Fields
- connect_app_company_name? string? - The company name set for the Connect App.
- connect_app_description? string? - A detailed description of the Connect App.
- connect_app_friendly_name? string? - The name of the Connect App.
- connect_app_homepage_url? string? - The public URL for the Connect App.
- connect_app_sid? string? - The SID that we assigned to the Connect App.
- permissions? Authorized_connect_app_enum_permission[]? - The set of permissions that you authorized for the Connect App. Can be:
get-all
orpost-all
.
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
twilio: AuthTokenConfig
Twilio Auth token Based Authentication configuration.
Fields
- accountSid string - Twilio account SID
- authToken string - Twilio authentication token of the account
twilio: Available_phone_number_country
Fields
- country_code? string? - The ISO-3166-1 country code of the country.
- country? string? - The name of the country.
- uri? string? - The URI of the Country resource, relative to
https://api.twilio.com
.
- beta? boolean? - Whether all phone numbers available in the country are new to the Twilio platform.
true
if they are andfalse
if all numbers are not in the Twilio Phone Number Beta program.
- subresource_uris? record {}? - A list of related AvailablePhoneNumber resources identified by their URIs relative to
https://api.twilio.com
.
twilio: Available_phone_number_local
Fields
- friendly_name? string? - A formatted version of the phone number.
- locality? string? - The locality or city of this phone number's location.
- rate_center? string? - The rate center of this phone number. Available for only phone numbers from the US and Canada.
- latitude? decimal? - The latitude of this phone number's location. Available for only phone numbers from the US and Canada.
- longitude? decimal? - The longitude of this phone number's location. Available for only phone numbers from the US and Canada.
- region? string? - The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada.
- postal_code? string? - The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada.
- iso_country? string? - The ISO country code of this phone number.
- address_requirements? string? - The type of Address resource the phone number requires. Can be:
none
,any
,local
, orforeign
.none
means no address is required.any
means an address is required, but it can be anywhere in the world.local
means an address in the phone number's country is required.foreign
means an address outside of the phone number's country is required.
- beta? boolean? - Whether the phone number is new to the Twilio platform. Can be:
true
orfalse
.
- capabilities? Available_phone_number_local_capabilities? - The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are:
Voice
,SMS
, andMMS
and each capability can be:true
orfalse
.
twilio: Available_phone_number_local_capabilities
The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: Voice
, SMS
, and MMS
and each capability can be: true
or false
.
Fields
- mms? boolean - Whether the phone number can send and receive MMS messages. Can be:
true
orfalse
.
- sms? boolean - Whether the phone number can send and receive SMS messages. Can be:
true
orfalse
.
- voice? boolean - Whether the phone number can receive voice calls. Can be:
true
orfalse
.
- fax? boolean - Whether the phone number can receive faxes. Can be:
true
orfalse
.
twilio: Available_phone_number_machine_to_machine
Fields
- friendly_name? string? - A formatted version of the phone number.
- locality? string? - The locality or city of this phone number's location.
- rate_center? string? - The rate center of this phone number. Available for only phone numbers from the US and Canada.
- latitude? decimal? - The latitude of this phone number's location. Available for only phone numbers from the US and Canada.
- longitude? decimal? - The longitude of this phone number's location. Available for only phone numbers from the US and Canada.
- region? string? - The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada.
- postal_code? string? - The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada.
- iso_country? string? - The ISO country code of this phone number.
- address_requirements? string? - The type of Address resource the phone number requires. Can be:
none
,any
,local
, orforeign
.none
means no address is required.any
means an address is required, but it can be anywhere in the world.local
means an address in the phone number's country is required.foreign
means an address outside of the phone number's country is required.
- beta? boolean? - Whether the phone number is new to the Twilio platform. Can be:
true
orfalse
.
- capabilities? Available_phone_number_local_capabilities? - The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are:
Voice
,SMS
, andMMS
and each capability can be:true
orfalse
.
twilio: Available_phone_number_mobile
Fields
- friendly_name? string? - A formatted version of the phone number.
- locality? string? - The locality or city of this phone number's location.
- rate_center? string? - The rate center of this phone number. Available for only phone numbers from the US and Canada.
- latitude? decimal? - The latitude of this phone number's location. Available for only phone numbers from the US and Canada.
- longitude? decimal? - The longitude of this phone number's location. Available for only phone numbers from the US and Canada.
- region? string? - The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada.
- postal_code? string? - The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada.
- iso_country? string? - The ISO country code of this phone number.
- address_requirements? string? - The type of Address resource the phone number requires. Can be:
none
,any
,local
, orforeign
.none
means no address is required.any
means an address is required, but it can be anywhere in the world.local
means an address in the phone number's country is required.foreign
means an address outside of the phone number's country is required.
- beta? boolean? - Whether the phone number is new to the Twilio platform. Can be:
true
orfalse
.
- capabilities? Available_phone_number_local_capabilities? - The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are:
Voice
,SMS
, andMMS
and each capability can be:true
orfalse
.
twilio: Available_phone_number_national
Fields
- friendly_name? string? - A formatted version of the phone number.
- locality? string? - The locality or city of this phone number's location.
- rate_center? string? - The rate center of this phone number. Available for only phone numbers from the US and Canada.
- latitude? decimal? - The latitude of this phone number's location. Available for only phone numbers from the US and Canada.
- longitude? decimal? - The longitude of this phone number's location. Available for only phone numbers from the US and Canada.
- region? string? - The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada.
- postal_code? string? - The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada.
- iso_country? string? - The ISO country code of this phone number.
- address_requirements? string? - The type of Address resource the phone number requires. Can be:
none
,any
,local
, orforeign
.none
means no address is required.any
means an address is required, but it can be anywhere in the world.local
means an address in the phone number's country is required.foreign
means an address outside of the phone number's country is required.
- beta? boolean? - Whether the phone number is new to the Twilio platform. Can be:
true
orfalse
.
- capabilities? Available_phone_number_local_capabilities? - The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are:
Voice
,SMS
, andMMS
and each capability can be:true
orfalse
.
twilio: Available_phone_number_shared_cost
Fields
- friendly_name? string? - A formatted version of the phone number.
- locality? string? - The locality or city of this phone number's location.
- rate_center? string? - The rate center of this phone number. Available for only phone numbers from the US and Canada.
- latitude? decimal? - The latitude of this phone number's location. Available for only phone numbers from the US and Canada.
- longitude? decimal? - The longitude of this phone number's location. Available for only phone numbers from the US and Canada.
- region? string? - The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada.
- postal_code? string? - The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada.
- iso_country? string? - The ISO country code of this phone number.
- address_requirements? string? - The type of Address resource the phone number requires. Can be:
none
,any
,local
, orforeign
.none
means no address is required.any
means an address is required, but it can be anywhere in the world.local
means an address in the phone number's country is required.foreign
means an address outside of the phone number's country is required.
- beta? boolean? - Whether the phone number is new to the Twilio platform. Can be:
true
orfalse
.
- capabilities? Available_phone_number_local_capabilities? - The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are:
Voice
,SMS
, andMMS
and each capability can be:true
orfalse
.
twilio: Available_phone_number_toll_free
Fields
- friendly_name? string? - A formatted version of the phone number.
- locality? string? - The locality or city of this phone number's location.
- rate_center? string? - The rate center of this phone number. Available for only phone numbers from the US and Canada.
- latitude? decimal? - The latitude of this phone number's location. Available for only phone numbers from the US and Canada.
- longitude? decimal? - The longitude of this phone number's location. Available for only phone numbers from the US and Canada.
- region? string? - The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada.
- postal_code? string? - The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada.
- iso_country? string? - The ISO country code of this phone number.
- address_requirements? string? - The type of Address resource the phone number requires. Can be:
none
,any
,local
, orforeign
.none
means no address is required.any
means an address is required, but it can be anywhere in the world.local
means an address in the phone number's country is required.foreign
means an address outside of the phone number's country is required.
- beta? boolean? - Whether the phone number is new to the Twilio platform. Can be:
true
orfalse
.
- capabilities? Available_phone_number_local_capabilities? - The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are:
Voice
,SMS
, andMMS
and each capability can be:true
orfalse
.
twilio: Available_phone_number_voip
Fields
- friendly_name? string? - A formatted version of the phone number.
- locality? string? - The locality or city of this phone number's location.
- rate_center? string? - The rate center of this phone number. Available for only phone numbers from the US and Canada.
- latitude? decimal? - The latitude of this phone number's location. Available for only phone numbers from the US and Canada.
- longitude? decimal? - The longitude of this phone number's location. Available for only phone numbers from the US and Canada.
- region? string? - The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada.
- postal_code? string? - The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada.
- iso_country? string? - The ISO country code of this phone number.
- address_requirements? string? - The type of Address resource the phone number requires. Can be:
none
,any
,local
, orforeign
.none
means no address is required.any
means an address is required, but it can be anywhere in the world.local
means an address in the phone number's country is required.foreign
means an address outside of the phone number's country is required.
- beta? boolean? - Whether the phone number is new to the Twilio platform. Can be:
true
orfalse
.
- capabilities? Available_phone_number_local_capabilities? - The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are:
Voice
,SMS
, andMMS
and each capability can be:true
orfalse
.
twilio: Balance
Fields
- account_sid? string? - The unique SID identifier of the Account.
- balance? string? - The balance of the Account, in units specified by the unit parameter. Balance changes may not be reflected immediately. Child accounts do not contain balance information
- currency? string? - The units of currency for the account balance
twilio: Call
Fields
- sid? string? - The unique string that we created to identify this Call resource.
- parent_call_sid? string? - The SID that identifies the call that created this leg.
- phone_number_sid? string? - If the call was inbound, this is the SID of the IncomingPhoneNumber resource that received the call. If the call was outbound, it is the SID of the OutgoingCallerId resource from which the call was placed.
- status? Call_enum_status -
- duration? string? - The length of the call in seconds. This value is empty for busy, failed, unanswered, or ongoing calls.
- price? string? - The charge for this call, in the currency associated with the account. Populated after the call is completed. May not be immediately available.
- direction? string? - A string describing the direction of the call. Can be:
inbound
for inbound calls,outbound-api
for calls initiated via the REST API oroutbound-dial
for calls initiated by a<Dial>
verb. Using Elastic SIP Trunking, the values can betrunking-terminating
for outgoing calls from your communications infrastructure to the PSTN ortrunking-originating
for incoming calls to your communications infrastructure from the PSTN.
- answered_by? string? - Either
human
ormachine
if this call was initiated with answering machine detection. Empty otherwise.
- api_version? string? - The API version used to create the call.
- forwarded_from? string? - The forwarding phone number if this call was an incoming call forwarded from another number (depends on carrier supporting forwarding). Otherwise, empty.
- group_sid? string? - The Group SID associated with this call. If no Group is associated with the call, the field is empty.
- caller_name? string? - The caller's name if this call was an incoming call to a phone number with caller ID Lookup enabled. Otherwise, empty.
- queue_time? string? - The wait time in milliseconds before the call is placed.
- trunk_sid? string? - The unique identifier of the trunk resource that was used for this call. The field is empty if the call was not made using a SIP trunk or if the call is not terminated.
- uri? string? - The URI of this resource, relative to
https://api.twilio.com
.
- subresource_uris? record {}? - A list of subresources available to this call, identified by their URIs relative to
https://api.twilio.com
.
twilio: CallCall_event
Fields
- request? anydata? - Contains a dictionary representing the request of the call.
- response? anydata? - Contains a dictionary representing the call response, including a list of the call events.
twilio: CallCall_feedback
Fields
- issues? Call_feedback_enum_issues[]? - A list of issues experienced during the call. The issues can be:
imperfect-audio
,dropped-call
,incorrect-caller-id
,post-dial-delay
,digits-not-captured
,audio-latency
,unsolicited-call
, orone-way-audio
.
- quality_score? int? -
1
to5
quality score where1
represents imperfect experience and5
represents a perfect call.
- sid? string? - A 34 character string that uniquely identifies this resource.
twilio: CallCall_feedback_summary
Fields
- call_count? int? - The total number of calls.
- call_feedback_count? int? - The total number of calls with a feedback entry.
- end_date? string? - The last date for which feedback entries are included in this Feedback Summary, formatted as
YYYY-MM-DD
and specified in UTC.
- include_subaccounts? boolean? - Whether the feedback summary includes subaccounts;
true
if it does, otherwisefalse
.
- issues? anydata[]? - A list of issues experienced during the call. The issues can be:
imperfect-audio
,dropped-call
,incorrect-caller-id
,post-dial-delay
,digits-not-captured
,audio-latency
, orone-way-audio
.
- quality_score_average? decimal? - The average QualityScore of the feedback entries.
- quality_score_median? decimal? - The median QualityScore of the feedback entries.
- quality_score_standard_deviation? decimal? - The standard deviation of the quality scores.
- sid? string? - A 34 character string that uniquely identifies this resource.
- start_date? string? - The first date for which feedback entries are included in this feedback summary, formatted as
YYYY-MM-DD
and specified in UTC.
- status? Call_feedback_summary_enum_status -
twilio: CallCall_notification
Fields
- api_version? string? - The API version used to create the Call Notification resource.
- error_code? string? - A unique error code for the error condition that is described in our Error Dictionary.
- log? string? - An integer log level that corresponds to the type of notification:
0
is ERROR,1
is WARNING.
- message_text? string? - The text of the notification.
- more_info? string? - The URL for more information about the error condition. This value is a page in our Error Dictionary.
- request_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers.
- request_url? string? - The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called.
- sid? string? - The unique string that that we created to identify the Call Notification resource.
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
twilio: CallCall_notificationInstance
Fields
- api_version? string? - The API version used to create the Call Notification resource.
- error_code? string? - A unique error code for the error condition that is described in our Error Dictionary.
- log? string? - An integer log level that corresponds to the type of notification:
0
is ERROR,1
is WARNING.
- message_text? string? - The text of the notification.
- more_info? string? - The URL for more information about the error condition. This value is a page in our Error Dictionary.
- request_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers.
- request_url? string? - The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called.
- request_variables? string? - The HTTP GET or POST variables we sent to your server. However, if the notification was generated by our REST API, this contains the HTTP POST or PUT variables you sent to our API.
- response_body? string? - The HTTP body returned by your server.
- response_headers? string? - The HTTP headers returned by your server.
- sid? string? - The unique string that that we created to identify the Call Notification resource.
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
twilio: CallCall_recording
Fields
- api_version? string? - The API version used to make the recording.
- conference_sid? string? - The Conference SID that identifies the conference associated with the recording, if a conference recording.
- duration? string? - The length of the recording in seconds.
- sid? string? - The unique string that that we created to identify the Recording resource.
- price? decimal? - The one-time cost of creating the recording in the
price_unit
currency.
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
- encryption_details? anydata? - How to decrypt the recording if it was encrypted using Call Recording Encryption feature.
- price_unit? string? - The currency used in the
price
property. Example:USD
.
- status? Call_recording_enum_status -
- channels? int? - The number of channels in the final recording file. Can be:
1
, or2
. Separating a two leg call into two separate channels of the recording file is supported in Dial and Outbound Rest API record options.
- 'source? Call_recording_enum_source -
- error_code? int? - The error code that describes why the recording is
absent
. The error code is described in our Error Dictionary. This value is null if the recordingstatus
is notabsent
.
- track? string? - The recorded track. Can be:
inbound
,outbound
, orboth
.
twilio: CallPayments
Fields
- sid? string? - The SID of the Payments resource.
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
twilio: CallSiprec
Fields
- sid? string? - The SID of the Siprec resource.
- name? string? - The user-specified name of this Siprec, if one was given when the Siprec was created. This may be used to stop the Siprec.
- status? Siprec_enum_status -
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
twilio: CallStream
Fields
- sid? string? - The SID of the Stream resource.
- name? string? - The user-specified name of this Stream, if one was given when the Stream was created. This may be used to stop the Stream.
- status? Stream_enum_status -
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
twilio: CallUser_defined_message
Fields
- sid? string? - The SID that uniquely identifies this User Defined Message.
- date_created? string? - The date that this User Defined Message was created, given in RFC 2822 format.
twilio: CallUser_defined_message_subscription
Fields
- sid? string? - The SID that uniquely identifies this User Defined Message Subscription.
- date_created? string? - The date that this User Defined Message Subscription was created, given in RFC 2822 format.
- uri? string? - The URI of the User Defined Message Subscription Resource, relative to
https://api.twilio.com
.
twilio: ClientHttp1Settings
Provides settings related to HTTP/1.x protocol.
Fields
- keepAlive KeepAlive(default http:KEEPALIVE_AUTO) - Specifies whether to reuse a connection for multiple requests
- chunking Chunking(default http:CHUNKING_AUTO) - The chunking behaviour of the request
- proxy? ProxyConfig - Proxy server related options
twilio: Conference
Fields
- api_version? string? - The API version used to create this conference.
- friendly_name? string? - A string that you assigned to describe this conference room. Maxiumum length is 128 characters.
- region? string? - A string that represents the Twilio Region where the conference audio was mixed. May be
us1
,ie1
,de1
,sg1
,br1
,au1
, andjp1
. Basic conference audio will always be mixed inus1
. Global Conference audio will be mixed nearest to the majority of participants.
- sid? string? - The unique string that that we created to identify this Conference resource.
- status? Conference_enum_status -
- uri? string? - The URI of this resource, relative to
https://api.twilio.com
.
- subresource_uris? record {}? - A list of related resources identified by their URIs relative to
https://api.twilio.com
.
- reason_conference_ended? Conference_enum_reason_conference_ended -
- call_sid_ending_conference? string? - The call SID that caused the conference to end.
twilio: ConferenceConference_recording
Fields
- api_version? string? - The API version used to create the recording.
- conference_sid? string? - The Conference SID that identifies the conference associated with the recording.
- duration? string? - The length of the recording in seconds.
- sid? string? - The unique string that that we created to identify the Conference Recording resource.
- price? string? - The one-time cost of creating the recording in the
price_unit
currency.
- price_unit? string? - The currency used in the
price
property. Example:USD
.
- status? Conference_recording_enum_status -
- channels? int? - The number of channels in the final recording file. Can be:
1
, or2
. Separating a two leg call into two separate channels of the recording file is supported in Dial and Outbound Rest API record options.
- 'source? Conference_recording_enum_source -
- error_code? int? - The error code that describes why the recording is
absent
. The error code is described in our Error Dictionary. This value is null if the recordingstatus
is notabsent
.
- encryption_details? anydata? - How to decrypt the recording if it was encrypted using Call Recording Encryption feature.
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
twilio: ConferenceParticipant
Fields
- label? string? - The user-specified label of this participant, if one was given when the participant was created. This may be used to fetch, update or delete the participant.
- call_sid_to_coach? string? - The SID of the participant who is being
coached
. The participant being coached is the only participant who can hear the participant who iscoaching
.
- coaching? boolean? - Whether the participant is coaching another call. Can be:
true
orfalse
. If not present, defaults tofalse
unlesscall_sid_to_coach
is defined. Iftrue
,call_sid_to_coach
must be defined.
- conference_sid? string? - The SID of the conference the participant is in.
- end_conference_on_exit? boolean? - Whether the conference ends when the participant leaves. Can be:
true
orfalse
and the default isfalse
. Iftrue
, the conference ends and all other participants drop out when the participant leaves.
- muted? boolean? - Whether the participant is muted. Can be
true
orfalse
.
- hold? boolean? - Whether the participant is on hold. Can be
true
orfalse
.
- start_conference_on_enter? boolean? - Whether the conference starts when the participant joins the conference, if it has not already started. Can be:
true
orfalse
and the default istrue
. Iffalse
and the conference has not started, the participant is muted and hears background music until another participant starts the conference.
- status? Participant_enum_status -
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
twilio: Connect_app
Fields
- authorize_redirect_url? string? - The URL we redirect the user to after we authenticate the user and obtain authorization to access the Connect App.
- company_name? string? - The company name set for the Connect App.
- deauthorize_callback_method? "HEAD"|"GET"|"POST"|"PATCH"|"PUT"|"DELETE" - The HTTP method we use to call
deauthorize_callback_url
.
- deauthorize_callback_url? string? - The URL we call using the
deauthorize_callback_method
to de-authorize the Connect App.
- description? string? - The description of the Connect App.
- friendly_name? string? - The string that you assigned to describe the resource.
- homepage_url? string? - The public URL where users can obtain more information about this Connect App.
- permissions? Connect_app_enum_permission[]? - The set of permissions that your ConnectApp requests.
- sid? string? - The unique string that that we created to identify the ConnectApp resource.
- uri? string? - The URI of the resource, relative to
https://api.twilio.com
.
twilio: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth AuthTokenConfig|ApiKeyConfig - Configurations related to client authentication
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings? ClientHttp1Settings - Configurations related to HTTP/1.x protocol
- http2Settings? ClientHttp2Settings - Configurations related to HTTP/2 protocol
- timeout decimal(default 60) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded
/x-forwarded
header
- poolConfig? PoolConfiguration - Configurations associated with request pooling
- cache? CacheConfig - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding
) header
- circuitBreaker? CircuitBreakerConfig - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig? RetryConfig - Configurations associated with retrying
- responseLimits? ResponseLimitConfigs - Configurations associated with inbound response size limits
- secureSocket? ClientSecureSocket - SSL/TLS-related options
- proxy? ProxyConfig - Proxy server related options
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
twilio: CreateAccountRequest
Fields
- FriendlyName? string - A human readable description of the account to create, defaults to
SubAccount Created at {YYYY-MM-DD HH:MM meridian}
twilio: CreateAddressRequest
Fields
- CustomerName string - The name to associate with the new address.
- Street string - The number and street address of the new address.
- City string - The city of the new address.
- Region string - The state or region of the new address.
- PostalCode string - The postal code of the new address.
- IsoCountry string - The ISO country code of the new address.
- FriendlyName? string - A descriptive string that you create to describe the new address. It can be up to 64 characters long.
- EmergencyEnabled? boolean - Whether to enable emergency calling on the new address. Can be:
true
orfalse
.
- AutoCorrectAddress?