This defines the List Areacodes API:
A Fax API request looks like:
https://fax.to/api/v2/areacodes/{COUNTRY_CODE}/{STATE_ID}?api_key=API_KEY
This request contains:
The following table shows the parameters you use in the request:
Parameter | Description | Required |
---|---|---|
COUNTRY_CODE | Indicates the country code in its ISO 3166-1 alpha-3 format (e.g. “GBR” for United Kingdom, “USA” for United States of America, “BEL” for Belgium, etc.). For example, CAN for Canada. |
Yes. |
STATE_ID | The numerical identifier for the state | Yes. |
The following table shows the information for authentication:
Parameter | Description | Required |
---|---|---|
api_key | Your Key. For example, api_key=f@x2r0ckkz . |
Yes. |
You find your Key in Dashboard.
To ensure privacy, you must use HTTPS for all Faxto API requests.
You submit all requests with a POST or GET call using UTF-8 encoding and URL encoded values.
We support JSON ONLY responses
{
"status": "success",
"areacodes": [
{
"country_code": "USA",
"state_id": 1,
"area_code": "205"
},
{
"country_code": "USA",
"state_id": 1,
"area_code": "251"
},
...
}
Key | Value | Response Type |
---|---|---|
status | The status of the API request | JSON |
areacodes | Array containing areacodes | JSON |
HTTP Status Code | Reason |
---|---|
200 | Successful response |
401 | Unauthorized. |
403 | Rate limit exceeded |
404 | Resource not Found |
500 | Internal server error |