GET
/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/MachineToMachine.jsonList available machine-to-machine phone numbers
Lists available machine-to-machine phone numbers in a specified country. Apply capability, geographic, address, and pattern filters to narrow the results, and use the pagination parameters to retrieve additional pages.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
AccountSidstringrequired
The 34-character SID of the account requesting available phone numbers. Must match the `AC` account SID format.
CountryCodestringrequired
The ISO 3166-1 country code from which to retrieve machine-to-machine phone numbers.
AreaCodeintegeroptional
The area code to filter by; applies only to phone numbers in the United States and Canada.
Containsstringoptional
A 2-to-16-character matching pattern for phone numbers using digits, non-diacritic Latin letters, and the allowed meta-characters `*`, `%`, `+`, and `$`.
SmsEnabledbooleanoptional
Whether returned phone numbers can receive SMS messages: `true` or `false`.
MmsEnabledbooleanoptional
Whether returned phone numbers can receive MMS messages: `true` or `false`.
VoiceEnabledbooleanoptional
Whether returned phone numbers can receive calls: `true` or `false`.
ExcludeAllAddressRequiredbooleanoptional
Whether to exclude phone numbers requiring an address: `true` or `false`. Defaults to `false` when omitted.
ExcludeLocalAddressRequiredbooleanoptional
Whether to exclude phone numbers requiring a local address: `true` or `false`. Defaults to `false` when omitted.
ExcludeForeignAddressRequiredbooleanoptional
Whether to exclude phone numbers requiring a foreign address: `true` or `false`. Defaults to `false` when omitted.
Betabooleanoptional
Whether to include phone numbers new to the platform: `true` or `false`. Defaults to `true` when omitted.
NearNumberstringoptional
A phone number used to find geographically close numbers within the search distance. Must use phone-number format and applies only in the United States and Canada.
NearLatLongstringoptional
A `lat,long` coordinate pair used to find geographically close numbers; applies only in the United States and Canada.
Distanceintegeroptional
Search radius in miles for a near-number query. Can be up to 500 and defaults to 25 when omitted; applies only in the United States and Canada.
InPostalCodestringoptional
Postal code used to limit results; applies only in the United States and Canada.
InRegionstringoptional
Region, state, or province used to limit results; applies only in the United States and Canada.
InRateCenterstringoptional
Rate center used to limit results; requires `InLata` and applies only in the United States and Canada.
InLatastringoptional
Local access and transport area used to limit results; applies only in the United States and Canada.
InLocalitystringoptional
Locality or city used to limit results.
FaxEnabledbooleanoptional
Whether returned phone numbers can receive faxes: `true` or `false`.
PageSizeintegeroptional
Number of phone numbers to return per page. Must be between 1 and 1000, and defaults to 50 when omitted.
Pageintegeroptional
Page index used for client state. Must be zero or greater when supplied.
PageTokenstringoptional
API-provided token used to retrieve a subsequent page of phone numbers.
200Returns a paginated collection of available machine-to-machine phone numbers, including phone number details, geographic information, address requirements, beta status, capabilities, and page metadata.
endintegeroptional
first_page_uristringoptional
next_page_uristringoptional
pageintegeroptional
page_sizeintegeroptional
previous_page_uristringoptional
startintegeroptional
uristringoptional
available_phone_numbersarray<object>optional
Error handling
AccountSid must be a 34-character SID matching the AC account pattern, and CountryCode must use the ISO 3166-1 country-code format. Contains must follow the documented 2-to-16-character pattern rules, PageSize must be between 1 and 1000, and Page must be zero or greater when supplied.