Get Available Countries
Retrieve a list of countries where phone numbers are available for purchase.
GET
Your role needs the phone_number:view permission. Otherwise the request fails with 403 {"error": "Insufficient permissions"}.
US, CA and AU are always listed. GB is listed only when UK numbers are offered on the platform, so read the response rather than assuming it is there.
Headers
x-workspace-idstringrequiredWorkspace identifier for the API.
Response Fields
countriesarrayArray of available countries.
codestringTwo-letter country code: US, CA, AU, and GB when UK numbers are offered.
namestringFull country name.
availablebooleanAlways true. Only countries you can buy numbers in are listed.
{
"countries": [
{ "code": "US", "name": "United States", "available": true },
{ "code": "CA", "name": "Canada", "available": true },
{ "code": "AU", "name": "Australia", "available": true },
{ "code": "GB", "name": "United Kingdom", "available": true }
]
}Last updated on