An Application Resource (also referred to as a "TwiML Application" or "TwiML App") represents a collection of endpoints that return TwiML instructions to Twilio. TwiML Applications are most commonly used for the Voice SDKs to handle outbound calls, but can also be used to configure multiple phone numbers with the same set of TwiML endpoints.
The Applications list resource represents the set of an account's Twilio
applications. You can POST
to the list resource to create a new application.
Note that accounts can contain at most 1000 applications.
Applications are useful for encapsulating configuration information that you need to distribute across multiple phone numbers. You can assign an ApplicationSid to an IncomingPhoneNumber to tell Twilio to use the application's URLs instead of the ones set directly on the IncomingPhoneNumber. So if you create an application with its VoiceUrl set to http://myapp.com/answer, you can assign that application to all of your phone numbers and Twilio will make a request to that URL whenever a call comes in.
account_sid
type: SID<AC>The SID of the Account that created the Application resource.
^AC[0-9a-fA-F]{32}$
34
34
date_created
type: string<date-time-rfc-2822>The date and time in GMT that the resource was created specified in RFC 2822 format.
date_updated
type: string<date-time-rfc-2822>The date and time in GMT that the resource was last updated specified in RFC 2822 format.
message_status_callback
type: string<uri>The URL we call using a POST method to send message status information to your application.
sid
type: SID<AP>The unique string that that we created to identify the Application resource.
^AP[0-9a-fA-F]{32}$
34
34
sms_fallback_method
type: enum<http-method>The HTTP method we use to call sms_fallback_url
. Can be: GET
or POST
.
GET
POST
sms_fallback_url
type: string<uri>The URL that we call when an error occurs while retrieving or executing the TwiML from sms_url
.
sms_method
type: enum<http-method>The HTTP method we use to call sms_url
. Can be: GET
or POST
.
GET
POST
sms_status_callback
type: string<uri>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
type: string<uri>The URL we call when the phone number receives an incoming SMS message.
status_callback
type: string<uri>The URL we call using the status_callback_method
to send status information to your application.
status_callback_method
type: enum<http-method>The HTTP method we use to call status_callback
. Can be: GET
or POST
.
GET
POST
voice_caller_id_lookup
type: booleanWhether we look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: true
or false
.
voice_fallback_method
type: enum<http-method>The HTTP method we use to call voice_fallback_url
. Can be: GET
or POST
.
GET
POST
voice_fallback_url
type: string<uri>The URL that we call when an error occurs retrieving or executing the TwiML requested by url
.
voice_method
type: enum<http-method>The HTTP method we use to call voice_url
. Can be: GET
or POST
.
GET
POST
voice_url
type: string<uri>The URL we call when the phone number assigned to this application receives a call.
public_application_connect_enabled
type: booleanWhether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: true
or false
.
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Applications.json
Creates a new application within your account.
If successful, Twilio responds with a representation of the new application.
AccountSid
type: SID<AC>The SID of the Account that will create the resource.
^AC[0-9a-fA-F]{32}$
34
34
ApiVersion
type: stringThe API version to use to start a new TwiML session. Can be: 2010-04-01
or 2008-08-01
. The default value is the account's default API version.
VoiceUrl
type: string<uri>The URL we should call when the phone number assigned to this application receives a call.
VoiceMethod
type: enum<http-method>The HTTP method we should use to call voice_url
. Can be: GET
or POST
.
GET
POST
VoiceFallbackUrl
type: string<uri>The URL that we should call when an error occurs retrieving or executing the TwiML requested by url
.
VoiceFallbackMethod
type: enum<http-method>The HTTP method we should use to call voice_fallback_url
. Can be: GET
or POST
.
GET
POST
StatusCallback
type: string<uri>The URL we should call using the status_callback_method
to send status information to your application.
StatusCallbackMethod
type: enum<http-method>The HTTP method we should use to call status_callback
. Can be: GET
or POST
.
GET
POST
VoiceCallerIdLookup
type: booleanWhether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: true
or false
.
SmsUrl
type: string<uri>The URL we should call when the phone number receives an incoming SMS message.
SmsMethod
type: enum<http-method>The HTTP method we should use to call sms_url
. Can be: GET
or POST
.
GET
POST
SmsFallbackUrl
type: string<uri>The URL that we should call when an error occurs while retrieving or executing the TwiML from sms_url
.
SmsFallbackMethod
type: enum<http-method>The HTTP method we should use to call sms_fallback_url
. Can be: GET
or POST
.
GET
POST
SmsStatusCallback
type: string<uri>The URL we should call using a POST method to send status information about SMS messages sent by the application.
MessageStatusCallback
type: string<uri>The URL we should call using a POST method to send message status information to your application.
FriendlyName
type: stringA descriptive string that you create to describe the new application. It can be up to 64 characters long.
PublicApplicationConnectEnabled
type: booleanWhether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: true
or false
.
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json
AccountSid
type: SID<AC>The SID of the Account that created the Application resource to fetch.
^AC[0-9a-fA-F]{32}$
34
34
Sid
type: SID<AP>The Twilio-provided string that uniquely identifies the Application resource to fetch.
^AP[0-9a-fA-F]{32}$
34
34
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Applications.json
Returns a list of Application resource representations, each representing an application within your account. The list includes paging information.
AccountSid
type: SID<AC>The SID of the Account that created the Application resources to read.
^AC[0-9a-fA-F]{32}$
34
34
FriendlyName
type: stringThe string that identifies the Application resources to read.
PageSize
type: integerHow many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Page
type: integerThe page index. This value is simply for client state.
0
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json
Tries to update the application's properties, and returns the updated
resource representation if successful. The returned response is identical
to that returned above when making a GET
request.
AccountSid
type: SID<AC>The SID of the Account that created the Application resources to update.
^AC[0-9a-fA-F]{32}$
34
34
Sid
type: SID<AP>The Twilio-provided string that uniquely identifies the Application resource to update.
^AP[0-9a-fA-F]{32}$
34
34
FriendlyName
type: stringA descriptive string that you create to describe the resource. It can be up to 64 characters long.
ApiVersion
type: stringThe API version to use to start a new TwiML session. Can be: 2010-04-01
or 2008-08-01
. The default value is your account's default API version.
VoiceUrl
type: string<uri>The URL we should call when the phone number assigned to this application receives a call.
VoiceMethod
type: enum<http-method>The HTTP method we should use to call voice_url
. Can be: GET
or POST
.
GET
POST
VoiceFallbackUrl
type: string<uri>The URL that we should call when an error occurs retrieving or executing the TwiML requested by url
.
VoiceFallbackMethod
type: enum<http-method>The HTTP method we should use to call voice_fallback_url
. Can be: GET
or POST
.
GET
POST
StatusCallback
type: string<uri>The URL we should call using the status_callback_method
to send status information to your application.
StatusCallbackMethod
type: enum<http-method>The HTTP method we should use to call status_callback
. Can be: GET
or POST
.
GET
POST
VoiceCallerIdLookup
type: booleanWhether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: true
or false
.
SmsUrl
type: string<uri>The URL we should call when the phone number receives an incoming SMS message.
SmsMethod
type: enum<http-method>The HTTP method we should use to call sms_url
. Can be: GET
or POST
.
GET
POST
SmsFallbackUrl
type: string<uri>The URL that we should call when an error occurs while retrieving or executing the TwiML from sms_url
.
SmsFallbackMethod
type: enum<http-method>The HTTP method we should use to call sms_fallback_url
. Can be: GET
or POST
.
GET
POST
SmsStatusCallback
type: string<uri>Same as message_status_callback: The URL we should call using a POST method to send status information about SMS messages sent by the application. Deprecated, included for backwards compatibility.
MessageStatusCallback
type: string<uri>The URL we should call using a POST method to send message status information to your application.
PublicApplicationConnectEnabled
type: booleanWhether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: true
or false
.
DELETE https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Applications/{Sid}.json
Delete this application. If this application's sid is assigned to any IncomingPhoneNumber resources as a VoiceApplicationSid or SmsApplicationSid it will be removed.
If successful, Twilio will return an HTTP 204 response with no body.
AccountSid
type: SID<AC>The SID of the Account that created the Application resources to delete.
^AC[0-9a-fA-F]{32}$
34
34
Sid
type: SID<AP>The Twilio-provided string that uniquely identifies the Application resource to delete.
^AP[0-9a-fA-F]{32}$
34
34