API reference
Carrier phone numbers
Provision, list, and analyze the phone numbers your carrier controls.
Phone number resource
PhoneNumberjson
{
"data": {
"id": "PN…",
"type": "phone_number",
"attributes": {
"number": "+23412000000",
"visibility": "public",
"country": "NG",
"price": "5000.00",
"region": "LA",
"locality": "Lagos",
"rate_center": "LAGOS",
"metadata": {},
"status": "available"
}
}
}Create / provision a number
POST/carrier/v1/phone_numbers
| Parameter | Type | Description |
|---|---|---|
data.type required | string | phone_number |
data.attributes.number required | string | The E.164 number to provision. |
data.attributes.visibility optional | string | public or private. |
data.attributes.country optional | string | ISO country code (e.g. NG). |
data.attributes.price optional | string | Monthly price customers are charged. |
data.attributes.region optional | string | Region / area code. |
data.attributes.locality optional | string | Locality name. |
data.attributes.rate_center optional | string | Rate center. |
data.attributes.lata optional | string | Local access transport area. |
data.attributes.latitude optional | number | Latitude. |
data.attributes.longitude optional | number | Longitude. |
data.attributes.metadata optional | object | Arbitrary metadata. |
List phone numbers
GET/carrier/v1/phone_numbers
Return all numbers, with optional filters.
| Parameter | Type | Description |
|---|---|---|
filter[visibility] optional | string | Filter by visibility. |
filter[country] optional | string | Filter by country code. |
filter[number] optional | string | Filter by number. |
Number stats
GET/carrier/v1/phone_numbers/stats
Return aggregate statistics across the carrier's numbers.
| Parameter | Type | Description |
|---|---|---|
from_date optional | string | Start date for the stats window. |
to_date optional | string | End date for the stats window. |
account_id optional | string | Restrict to one account. |
Fetch a number
GET/carrier/v1/phone_numbers/{id}
Return a single phone number.
Update a number
PATCH/carrier/v1/phone_numbers/{id}
Update price, visibility, metadata, and other attributes.
Release a number
DELETE/carrier/v1/phone_numbers/{id}
Release the number back to the inventory.
Response — 200 OK.