Create a new application within your account
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.
Create a new application within your account
Path parameters
-
The SID of the Account that will create the resource.
Body
-
ApiVersion string
The API version to use to start a new TwiML session. Can be:
2010-04-01
or2008-08-01
. The default value is the account's default API version. -
FriendlyName string
A descriptive string that you create to describe the new application. It can be up to 64 characters long.
-
MessageStatusCallback string(uri)
The URL we should call using a POST method to send message status information to your application.
-
SmsFallbackMethod string(http-method)
The HTTP method we should use to call
sms_fallback_url
. Can be:GET
orPOST
.Values are
HEAD
,GET
,POST
,PATCH
,PUT
, orDELETE
. -
SmsFallbackUrl string(uri)
The URL that we should call when an error occurs while retrieving or executing the TwiML from
sms_url
. -
SmsMethod string(http-method)
The HTTP method we should use to call
sms_url
. Can be:GET
orPOST
.Values are
HEAD
,GET
,POST
,PATCH
,PUT
, orDELETE
. -
SmsStatusCallback string(uri)
The URL we should call using a POST method to send status information about SMS messages sent by the application.
-
SmsUrl string(uri)
The URL we should call when the phone number receives an incoming SMS message.
-
StatusCallback string(uri)
The URL we should call using the
status_callback_method
to send status information to your application. -
StatusCallbackMethod string(http-method)
The HTTP method we should use to call
status_callback
. Can be:GET
orPOST
.Values are
HEAD
,GET
,POST
,PATCH
,PUT
, orDELETE
. -
VoiceCallerIdLookup boolean
Whether we should look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be:
true
orfalse
. -
VoiceFallbackMethod string(http-method)
The HTTP method we should use to call
voice_fallback_url
. Can be:GET
orPOST
.Values are
HEAD
,GET
,POST
,PATCH
,PUT
, orDELETE
. -
VoiceFallbackUrl string(uri)
The URL that we should call when an error occurs retrieving or executing the TwiML requested by
url
. -
VoiceMethod string(http-method)
The HTTP method we should use to call
voice_url
. Can be:GET
orPOST
.Values are
HEAD
,GET
,POST
,PATCH
,PUT
, orDELETE
. -
VoiceUrl string(uri)
The URL we should call when the phone number assigned to this application receives a call.
curl \
-X POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Applications.json \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'ApiVersion=string&FriendlyName=string&MessageStatusCallback=https%3A%2F%2Fexample.com&SmsFallbackMethod=HEAD&SmsFallbackUrl=https%3A%2F%2Fexample.com&SmsMethod=HEAD&SmsStatusCallback=https%3A%2F%2Fexample.com&SmsUrl=https%3A%2F%2Fexample.com&StatusCallback=https%3A%2F%2Fexample.com&StatusCallbackMethod=HEAD&VoiceCallerIdLookup=true&VoiceFallbackMethod=HEAD&VoiceFallbackUrl=https%3A%2F%2Fexample.com&VoiceMethod=HEAD&VoiceUrl=https%3A%2F%2Fexample.com'
{
"ApiVersion": "string",
"FriendlyName": "string",
"MessageStatusCallback": "https://example.com",
"SmsFallbackMethod": "HEAD",
"SmsFallbackUrl": "https://example.com",
"SmsMethod": "HEAD",
"SmsStatusCallback": "https://example.com",
"SmsUrl": "https://example.com",
"StatusCallback": "https://example.com",
"StatusCallbackMethod": "HEAD",
"VoiceCallerIdLookup": true,
"VoiceFallbackMethod": "HEAD",
"VoiceFallbackUrl": "https://example.com",
"VoiceMethod": "HEAD",
"VoiceUrl": "https://example.com"
}
{
"ApiVersion": "string",
"FriendlyName": "string",
"MessageStatusCallback": "https://example.com",
"SmsFallbackMethod": "HEAD",
"SmsFallbackUrl": "https://example.com",
"SmsMethod": "HEAD",
"SmsStatusCallback": "https://example.com",
"SmsUrl": "https://example.com",
"StatusCallback": "https://example.com",
"StatusCallbackMethod": "HEAD",
"VoiceCallerIdLookup": true,
"VoiceFallbackMethod": "HEAD",
"VoiceFallbackUrl": "https://example.com",
"VoiceMethod": "HEAD",
"VoiceUrl": "https://example.com"
}
{
"account_sid": "string",
"api_version": "string",
"date_created": "string",
"date_updated": "string",
"friendly_name": "string",
"message_status_callback": "https://example.com",
"sid": "string",
"sms_fallback_method": "HEAD",
"sms_fallback_url": "https://example.com",
"sms_method": "HEAD",
"sms_status_callback": "https://example.com",
"sms_url": "https://example.com",
"status_callback": "https://example.com",
"status_callback_method": "HEAD",
"uri": "https://example.com",
"voice_caller_id_lookup": true,
"voice_fallback_method": "HEAD",
"voice_fallback_url": "https://example.com",
"voice_method": "HEAD",
"voice_url": "https://example.com"
}
{
"account_sid": "string",
"api_version": "string",
"date_created": "string",
"date_updated": "string",
"friendly_name": "string",
"message_status_callback": "https://example.com",
"sid": "string",
"sms_fallback_method": "HEAD",
"sms_fallback_url": "https://example.com",
"sms_method": "HEAD",
"sms_status_callback": "https://example.com",
"sms_url": "https://example.com",
"status_callback": "https://example.com",
"status_callback_method": "HEAD",
"uri": "https://example.com",
"voice_caller_id_lookup": true,
"voice_fallback_method": "HEAD",
"voice_fallback_url": "https://example.com",
"voice_method": "HEAD",
"voice_url": "https://example.com"
}