An Application instance resource represents an application that you have created with Twilio. An application inside of Twilio is just a set of URLs and other configuration data that tells Twilio how to behave when one of your Twilio numbers receives a call or SMS message. This configuration data is the same configuration data that exists on IncomingPhoneNumber resources: 'VoiceUrl', 'VoiceMethod', 'VoiceFallbackUrl', 'VoiceFallbackMethod', 'StatusCallback', 'StatusCallbackMethod', 'VoiceCallerIdLookup', 'SmsUrl', 'SmsMethod', 'SmsFallbackUrl', 'SmsFallbackMethod', and 'SmsStatusCallback'.
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.
/2010-04-01/Accounts/{AccountSid}/Applications/{ApplicationSid}
| Property | Description |
|---|---|
| Sid | A 34 character string that uniquely identifies this resource. |
| DateCreated | The date that this resource was created, given as GMT RFC 2822 format. |
| DateUpdated | The date that this resource was last updated, given as GMT RFC 2822 format. |
| FriendlyName | A human readable descriptive text for this resource, up to 64 characters long. |
| AccountSid | The unique id of the Account that created this application. |
| ApiVersion | Requests to this application will start a new TwiML session with this API version. |
| VoiceUrl | The URL Twilio will request when a phone number assigned to this application receives a call. |
| VoiceMethod | The HTTP method Twilio will use when requesting the above Url. Either GET or POST. |
| VoiceFallbackUrl | The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by Url. |
| VoiceFallbackMethod | The HTTP method Twilio will use when requesting the VoiceFallbackUrl. Either GET or POST. |
| StatusCallback | The URL that Twilio will request to pass status parameters (such as call ended) to your application. |
| StatusCallbackMethod | The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST. |
| VoiceCallerIdLookup | Look up the caller's caller-ID name from the CNAM database (additional charges apply). Either true or false. |
| SmsUrl | The URL Twilio will request when a phone number assigned to this application receives an incoming SMS message. |
| SmsMethod | The HTTP method Twilio will use when making requests to the SmsUrl. Either GET or POST. |
| SmsFallbackUrl | The URL that Twilio will request if an error occurs retrieving or executing the TwiML from SmsUrl. |
| SmsFallbackMethod | The HTTP method Twilio will use when requesting the above URL. Either GET or POST. |
| SmsStatusCallback | Twilio will make a POST request to this URL to pass status parameters (such as sent or failed) to your application if you specify this application's Sid as the ApplicationSid on an outgoing SMS request. |
| Uri | The URI for this resource, relative to https://api.twilio.com. |
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.
You may specify one or more of the following parameters to update this application's respective properties:
| Parameter | Description |
|---|---|
| FriendlyName | A human readable description of the application, with maximum length 64 characters. |
| ApiVersion | Requests to this application's URLs will start a new TwiML session with this API version. Either 2010-04-01 or 2008-08-01. |
| VoiceUrl | The URL that Twilio should request when somebody dials a phone number assigned to this application. |
| VoiceMethod | The HTTP method that should be used to request the VoiceUrl. Either GET or POST. |
| VoiceFallbackUrl | A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by VoiceUrl. |
| VoiceFallbackMethod | The HTTP method that should be used to request the VoiceFallbackUrl. Either GET or POST. |
| StatusCallback | The URL that Twilio will request to pass status parameters (such as call ended) to your application. |
| StatusCallbackMethod | The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST. |
| VoiceCallerIdLookup | Do a lookup of a caller's name from the CNAM database and post it to your app. Either true or false. |
| SmsUrl | The URL that Twilio should request when somebody sends an SMS to a phone number assigned to this application. |
| SmsMethod | The HTTP method that should be used to request the SmsUrl. Either GET or POST. |
| SmsFallbackUrl | A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. |
| SmsFallbackMethod | The HTTP method that should be used to request the SmsFallbackUrl. Either GET or POST. |
| SmsStatusCallback | Twilio will make a POST request to this URL to pass status parameters (such as sent or failed) to your application if you specify this application's Sid as the ApplicationSid on an outgoing SMS request. |
Set the VoiceUrl and SmsUrl on an application to 'http://myapp.com/awesome'
Not supported.
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.
/2010-04-01/Accounts/{AccountSid}/Applications
Returns a list of Application resource representations, each representing an application within your account. The list includes paging information.
The following query string parameters allow you to limit the list returned. Note, parameters are case-sensitive:
| Parameter | Description |
|---|---|
| FriendlyName | Only return the Application resources with friendly names that exactly match this name. |
Return the application named "MyApp".
Creates a new application within your account.
Your request must include the following parameters:
| Parameter | Description |
|---|---|
| FriendlyName | A human readable description of the new application. Maximum 64 characters. |
Your request may include the following parameters:
| Parameter | Description |
|---|---|
| ApiVersion | Requests to this application's URLs will start a new TwiML session with this API version. Either 2010-04-01 or 2008-08-01. Defaults to your account's default API version. |
| VoiceUrl | The URL that Twilio should request when somebody dials a phone number assigned to this application. |
| VoiceMethod | The HTTP method that should be used to request the VoiceUrl. Must be either GET or POST. Defaults to POST. |
| VoiceFallbackUrl | A URL that Twilio will request if an error occurs requesting or executing the TwiML at Url. |
| VoiceFallbackMethod | The HTTP method that should be used to request the VoiceFallbackUrl. Either GET or POST. Defaults to POST. |
| StatusCallback | The URL that Twilio will request to pass status parameters (such as call ended) to your application. |
| StatusCallbackMethod | The HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST. Defaults to POST. |
| VoiceCallerIdLookup | Do a lookup of a caller's name from the CNAM database and post it to your app. Either true or false. Defaults to false. |
| SmsUrl | The URL that Twilio should request when somebody sends an SMS to a phone number assigned to this application. |
| SmsMethod | The HTTP method that should be used to request the SmsUrl. Must be either GET or POST. Defaults to POST. |
| SmsFallbackUrl | A URL that Twilio will request if an error occurs requesting or executing the TwiML defined by SmsUrl. |
| SmsFallbackMethod | The HTTP method that should be used to request the SmsFallbackUrl. Must be either GET or POST. Defaults to POST. |
| SmsStatusCallback | Twilio will make a POST request to this URL to pass status parameters (such as sent or failed) to your application if you specify this application's Sid as the ApplicationSid on an outgoing SMS request. |
If successful, Twilio responds with a representation of the new application.
Not Supported.
Not Supported.