A short code is a 5 or 6-digit number that can send and receive messages with mobile phones. These high-throughput numbers are perfect for apps that need to send messages to lots of users or need to send time-sensitive messages. You can buy shortcodes from Twilio or port existing short codes to Twilio.
To send messages from your short code, see the Sending Messages documentation.
The SID of the Account that created this ShortCode resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The API version used to start a new TwiML session when an SMS message is sent to this short code.
The date and time in GMT that this resource was created specified in RFC 2822 format.
The date and time in GMT that this resource was last updated, specified in RFC 2822 format.
A string that you assigned to describe this resource. By default, the FriendlyName
is the short code.
The unique string that that we created to identify this ShortCode resource.
^SC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The HTTP method we use to call the sms_fallback_url
. Can be: GET
or POST
.
GET
POST
The URL that we call if an error occurs while retrieving or executing the TwiML from sms_url
.
The HTTP method we use to call the sms_url
. Can be: GET
or POST
.
GET
POST
The URI of this resource, relative to https://api.twilio.com
.
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json
The SID of the Account that created the ShortCode resource(s) to fetch.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Twilio-provided string that uniquely identifies the ShortCode resource to fetch
^SC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json
Returns a list of ShortCode resources, each representing a short code within your account. This list includes paging information.
The following query string parameters allow you to limit the list returned.
Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit.
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
Return the set of short codes that match '67898'
Return the set of all phone numbers containing the digits '898'
POST https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes/{Sid}.json
Tries to update the shortcode's properties. This API call returns the updated resource representation if it is successful. The returned response is identical to that returned when making a GET
request.
The SID of the Account that created the ShortCode resource(s) to update.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The Twilio-provided string that uniquely identifies the ShortCode resource to update
^SC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
A descriptive string that you created to describe this resource. It can be up to 64 characters long. By default, the FriendlyName
is the short code.
The API version to use to start a new TwiML session. Can be: 2010-04-01
or 2008-08-01
.
The URL we should call when receiving an incoming SMS message to this short code.
The HTTP method we should use when calling the sms_url
. Can be: GET
or POST
.
GET
POST
The URL that we should call if an error occurs while retrieving or executing the TwiML from sms_url
.
The HTTP method that we should use to call the sms_fallback_url
. Can be: GET
or POST
.
GET
POST
Set the SMS Url on a short code to 'http://demo.twilio.com/docs/sms.xml'