GET {{2010-04-01-Accounts-AccountSid-AvailablePhoneNumbers-CountryCode-Local.json-Url}}/2010-04-01/Accounts/:AccountSid/AvailablePhoneNumbers/:CountryCode/Local.json?SmsEnabled=true
To send an SMS with Twilio you'll first need to buy a phone number. For that you have to search the catalog of available phone numbers. Once you have the list of available phone numbers, pick one and use it in the next request to buy the number. Learn more about this in the Twilio Docs.
Body
PARAM
Key | Datatype | Required | Description |
AreaCode
|
string | The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. | |
Contains
|
string | The pattern on which to match phone numbers. Valid characters are `*`, `0-9`, `a-z`, and `A-Z`. The `*` character matches any single digit. For examples, see [Example 2](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-number-pattern) and [Example 3](https://www.twilio.com/docs/phone-numbers/api/availablephonenumberlocal-resource?code-sample=code-find-phone-numbers-by-character-pattern). If specified, this value must have at least two characters. | |
SmsEnabled
|
boolean | Whether the phone numbers can receive text messages. Can be: `true` or `false`. | |
MmsEnabled
|
string | Whether the phone numbers can receive MMS messages. Can be: `true` or `false`. | |
VoiceEnabled
|
string | Whether the phone numbers can receive calls. Can be: `true` or `false`. | |
ExcludeAllAddressRequired
|
string | Whether to exclude phone numbers that require an [Address](https://www.twilio.com/docs/usage/api/address). Can be: `true` or `false` and the default is `false`. | |
ExcludeLocalAddressRequired
|
string | Curl curl -X GET '2010-04-01-Accounts-AccountSid-AvailablePhoneNumbers-CountryCode-Local.json-Url/2010-04-01/Accounts/:AccountSid/AvailablePhoneNumbers/:CountryCode/Local.json?SmsEnabled=true?AreaCode=<integer>&Contains=<string>&SmsEnabled=true&MmsEnabled=<boolean>&VoiceEnabled=<boolean>&ExcludeAllAddressRequired=<boolean>&ExcludeLocalAddressRequired=<boolean>&ExcludeForeignAddressRequired=<boolean>&Beta=<boolean>&NearNumber=<string>&NearLatLong=<string>&Distance=<integer>&InPostalCode=<string>&InRegion=<string>&InRateCenter=<string>&InLata=<string>&InLocality=<string>&FaxEnabled=<boolean>&PageSize=<integer>' ENDPOINTS |