List numbers
Method
Path
phone_numbers
Get a detailed list of the phone numbers that you currently own on Phaxio.
Request Parameters
| Name | Type | Description |
|---|---|---|
| country_code | integer | A country code (E.164) you'd like to filter by. |
| area_code | integer | An area code you'd like to filter by. If an area code is specified, then `country_code` is required. |
This operation also accepts paging parameters.
Response
A JSON object with success, message, and
data, and paging attributes. Results are paginated and the
paging attribute
holds information about the length of the data for your query. The data
attribute holds an array of Phone
Number Objects.
Sample Call
curl -G -u 'API_KEY:API_SECRET' https://api.phaxio.com/v2.1/phone_numbers \
-d 'country_code=1' \
-d 'area_code=847'Sample Response
{
"success":true,
"message":"Retrieved user phone numbers successfully",
"data":[
{
"phone_number":"+18475551234",
"city":"Northbrook",
"state":"Illinois",
"country":"United States",
"cost":200,
"last_billed_at":"2016-05-10T11:38:15.000-05:00",
"provisioned_at":"2016-03-10T11:38:15.000-06:00",
"callback_url":null
},
{
"phone_number":"+18476661235",
"city":"Northbrook",
"state":"Illinois",
"country":"United States",
"cost":200,
"last_billed_at":"2016-05-10T11:38:16.000-05:00",
"provisioned_at":"2016-04-10T11:38:15.000-05:00",
"callback_url":null
}
],
"paging":{
"total":2,
"per_page":25,
"page":1
}
}