GET
/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/National.jsonList available national phone numbers
Lists available national phone numbers in a specified country. Filter results by capabilities, number pattern, or geographic details to find numbers that meet your requirements.
AccountSidstringrequired
The SID of the account requesting available phone numbers. Must match the account SID format: 34 characters beginning with AC followed by 32 hexadecimal characters.
CountryCodestringrequired
The ISO 3166-1 country code for the country to search.
AreaCodeintegeroptional
Filter by area code. Applies only to phone numbers in the US and Canada.
Containsstringoptional
Match phone numbers using a 2-to-16-character pattern of digits, non-diacritic Latin letters, and supported meta-characters: `*`, `%`, `+`, and `$`. Wildcards are allowed only at the beginning or end; wildcard patterns must include at least two non-meta-characters, and meta-characters cannot be adjacent.
SmsEnabledbooleanoptional
Filter by whether the phone number can receive text messages.
MmsEnabledbooleanoptional
Filter by whether the phone number can receive MMS messages.
VoiceEnabledbooleanoptional
Filter by whether the phone number can receive calls.
ExcludeAllAddressRequiredbooleanoptional
Exclude phone numbers that require an address. Defaults to false when omitted.
ExcludeLocalAddressRequiredbooleanoptional
Exclude phone numbers that require a local address. Defaults to false when omitted.
ExcludeForeignAddressRequiredbooleanoptional
Exclude phone numbers that require a foreign address. Defaults to false when omitted.
Betabooleanoptional
Include phone numbers that are new to the platform. Defaults to true when omitted.
NearNumberstringoptional
Find geographically close numbers based on a phone number. Applies only to phone numbers in the US and Canada; the search radius defaults to 25 miles when omitted.
NearLatLongstringoptional
Find geographically close numbers based on a latitude and longitude pair in `lat,long` format. Applies only to phone numbers in the US and Canada.
Distanceintegeroptional
Search radius in miles for a `NearNumber` or `NearLatLong` search. Applies only to phone numbers in the US and Canada; defaults to 25 miles when omitted and can be up to 500.
InPostalCodestringoptional
Limit results to a postal code, or search in the same postal code as a phone number. Applies only to phone numbers in the US and Canada.
InRegionstringoptional
Limit results to a region, state, or province, or search in the same region as a phone number. Applies only to phone numbers in the US and Canada.
InRateCenterstringoptional
Limit results to a rate center, or search in the same rate center as a phone number. Applies only to phone numbers in the US and Canada; provide `InLata` as well.
InLatastringoptional
Limit results to a local access and transport area, or search in the same area as a phone number. Applies only to phone numbers in the US and Canada.
InLocalitystringoptional
Limit results to a locality or city, or search in the same locality as a phone number.
FaxEnabledbooleanoptional
Filter by whether the phone number can receive faxes.
PageSizeintegeroptional
Number of resources to return per page. Defaults to 50 when omitted; must be between 1 and 1000.
Pageintegeroptional
Page index for client state. Must be zero or greater.
PageTokenstringoptional
Token supplied by the API to identify a page of results.
200Returns a paginated response containing available national phone numbers and page metadata, including page size, page index, and navigation URIs.
endintegeroptional
first_page_uristringoptional
next_page_uristringoptional
pageintegeroptional
page_sizeintegeroptional
previous_page_uristringoptional
startintegeroptional
uristringoptional
available_phone_numbersarray<object>optional
Error handling
The AccountSid path parameter must match the account SID format, and CountryCode must be an ISO 3166-1 country code. Contains accepts a 2-to-16-character pattern using digits, non-diacritic Latin letters, and the supported meta-characters; PageSize must be between 1 and 1000, and Page must be zero or greater. Distance can be at most 500 miles; use InLata when you provide InRateCenter.