Skip to main content

Browse Coverage

This request returns data about available phone numbers rentable through CarrierX. Responses can also include inventory levels.

get /phonenumber/coverage

Sample

A sample GET request to get data about available phone numbers matching the criteria in the request URL:

curl -X GET \
'https://api.carrierx.com/core/v2/phonenumber/coverage?limit=1&group_by=state' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response

200 status code with data about available phone numbers:

{
"count": 1,
"has_more": true,
"items": [
{
"count": 81,
"key": "IL"
}
],
"limit": 1,
"offset": 0,
"pagination": {
"next": "https://api.carrierx.com/core/v2/phonenumber/coverage?limit=1&group_by=state&offset=1"
},
"total": 5
}

This request is enabled for Pagination, Result Filtering, and Field Filtering.

Required Scopes

To get information about phone numbers the partner must have one of the following scopes enabled:

  • phonenumber.manage
  • phonenumber.read

Query Arguments

ParameterData TypeDescriptionExamples
filterstringValues accepted in this field are:
  • capabilities allows selecting only phone numbers with certain capabilities (SMS, MMS, voice). Use this filter with the eq keyword to search for the exact capabilities value or with the bit keyword and the bit number value if you need a specific capability presence.
  • country_code allows filtering phone numbers by the ISO 3166-1 alpha-3 country code.
  • locality allows filtering phone numbers by locality (city, area, etc.)
  • npa allows filtering phone numbers by North American Numbering Plan area code (three digits).
  • npa_nxx allows filtering phone numbers by the first six digits of a NANP telephone number.
  • state allows filtering phone numbers by the two-letter state notation.
filter=capabilities+bit+4/ filter=capabilities+eq+31/ filter=npa+eq+516/ filter=state+eq+NY
group_by requiredstringWhich criteria the results should be grouped by. Values accepted in this field are:
  • country allows grouping the results by the state or territory they belong to.
  • locality allows grouping the results by city or area.
  • npa allows grouping the results by NANP area code (three digits).
  • npa_nxx allows grouping the results by the first six digits of a NANP telephone number.
  • state allows grouping the results by state.
Note that only one value is accepted at a time.
group_by=locality
orderstringValues accepted in this field are count or key. Only one value is accepted at a time. Refer to the table below for more information on these parameters.order=count+asc

Response Object

AttributeData TypeDescription
countintegerThe total quantity of phone numbers for the given NPA.
keystringThe value by which the phone numbers are grouped in the response.