List area codes available for purchasing numbers

Operation

areaCodes

Displays a list of area codes available for purchasing Phaxio numbers. This operation requires no authentication and can be used without passing an API key.

Parameters

Name Type Description
is_toll_free boolean Will only return toll free area codes
state string A two character state or province abbreviation (e.g. IL or YT). Will only return area codes available for this state.

Response

A JSON object with success, message, and data attributes. The data attribute contains a map of area codes to city and state.

Sample Call

curl -X POST https://api.phaxio.com/v1/areaCodes

Sample Response

{
    "success": true,
    "message": "295 area codes available.",
    "data": [
        "201": {
            "city": "Bayonne, Jersey City, Union City",
            "state": "New Jersey"
        },
        "202": {
            "city": "Washington",
            "state": "District Of Columbia"
        } // ... a lot more area codes here
    ]
}