Get List of Available Countries
Overview
To get the list of available countries for specified account, make the GET request to /accounts/{accountSID}/availableNumbers.
Request example
The following example demonstrates getting a list of available countries for the account.
curl –X GET ‘https://api.apico.net/v2/accounts/{accountSID}/availableNumbers’ \ -u {accountSID}:{authToken}
Response example
{ "page": 0, "limit": 20, "next": "https://api.apico.net/v2/accounts/{accountSID}/availableNumbers?limit=20&page=1", "prev": null, "total": 50, "countries": [ { "country_name": "Ireland", "country_code": "ie" }, ... ] }
Response parameters
Parameter |
Description |
page |
The current page number. Numbering starts with 0. |
limit |
A parameter describing how many records are returned at once. The default and maximum value is 20. |
next |
URI to the next part of the list. |
prev |
URI to the previous part of the list. |
total |
The total number of entries in the returned list. |
account_sid |
Account identifier. |
countries |
List of countries where it is possible to rent a number for specified account. |
countries/country_name |
Full name of the country, or international. |
countries/country_code |
Either country code according to ISO 3166-1 alpha-2 (for conventional numbers) or virtual (for virtual numbers). |