Twilio SMS
By twilio
Updated a month ago

Twilio SMS API Documentation

Twilio's Programmable SMS API helps you add robust messaging capabilities to your applications. Please read pricing details carefully.

Learn more about this API
GETFetch an Account Resource
Message Resource
POSTUpdate a Message Resource
GETFetch Multiple Message Resources
GETFetch a Message Resource
DELETEDelete a Message Resource
POSTSend SMS (Create a Message Resource)
Media Resource
GETRead Multiple Media Resources
GETFetch a Media Resource
DELETEDelete a Media Resouce
GETMessaging Pricing by Country
Service Resource
POSTUpdate a Service Resource
GETRead Multiple Service Resources
DELETEDelete a Service Resource
GETFetch a Service Resource
POSTCreate a Service Resource
Phone Numbers
GETAvailable Mobile Phone Numbers
GETFetch a Phone Number
GETAvailable Local Phone Numbers
POSTUpdate a Phone Number
DELETEDelete a Phone Number
GETFetch Multiple Phone Numbers
POSTBuy a Phone Number
POSTBuy a Phone Number

Purchase a Twilio phone number to send an SMS

Header Parameters
Required Parameters
REQUIREDAllowed values: `local` `mobile` or `toll free`
REQUIREDThe SID of the Account that will create the resource.
REQUIREDThe ISO-3166-1 country code of the country from which to buy a phone number.
Optional Parameters
OPTIONALThe phone number to purchase specified in E.164 format. E.164 phone numbers consist of a + followed by the country code and subscriber number without punctuation characters. For example, +14155551234.
OPTIONALThe HTTP method we should use to call status_callback. Can be: GET or POST and defaults to POST.
OPTIONALThe desired area code for your new incoming phone number. Can be any three-digit, US or Canada area code. We will provision an available phone number within this area code for you. You must provide an area_code or a phone_number. (US and Canada only).
OPTIONALThe URL we should call using the status_callback_method to send status information to your application.
OPTIONALThe SID of the Identity resource that we should associate with the new phone number. Some regions require an identity to meet local regulations.
OPTIONALA descriptive string that you created to describe the new phone number. It can be up to 64 characters long. By default, this is a formatted version of the new phone number.
OPTIONALThe SID of the Address resource we should associate with the new phone number. Some regions require addresses to meet local regulations.
Code Snippet
Install SDK
Response ExampleSchema

Install SDK for (Node.js)Unirest

OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication