Numbers

API Docs by APIMATIC
API OverviewNumber Management

Numbers
#

Numbers
#

The numbers API lets you retrieve a list of the phone numbers owned by your contact center. Please refer to the detailed API endpoint specification here.

Prerequisites
#

  • Your contact center must own at least one phone number.

Making requests
#

Authentication
#

The numbers API requires the base URL and the contact center API key.

Request parameters
#

The numbers API uses the following parameters.

The Authorization: Bearer token parameter is the contact center API key. It is used in the request header.

The page parameter is the pagination offset. Read the Metadata in the initial response to determine how many pages of data are available.

With these parameters, you can make a simple request:

{
  "method": "GET",
  "url": "https://cluster1.voiso.com/api/numbers/v1/numbers",
  "headers": {
    "Accept": "application/json",
    "Authorization": "Bearer 8a7b2c9d3e4f5g6h7i8j9k0l1m2n3o4p5q6r7s8t9u0v1w2x"
  },
  "params": {
    "page": "1"
  }
}

Response
#

The following table describes the elements of the response.

ElementSub-elementSub-element 2Sub-element 3DescriptionTypeNotes
numbersAn array of all the numbers you own.array
numberThe phone number in E.164 format.string
created_atThe date and time the number was first added.stringFormat is "YYYY-MM-DDThh:mm:ss.sssZ"
labelThe custom name your contact center applied to the number.string
countryThe country where the number belongs.string
cityThe city where the number belongs.string
typeThe type of the number.stringSupported types include Geographic, National, Toll-free, and Mobile
providerThe name of the source of the number.string
activation_feeThe fee to activate the number.string
monthly_feeThe monthly fee to use the number.string
scriptThe script or flow where the number is used.array
flowThe flow where the number is used.array
idThe unique ID assigned to the flow when it was created.string
nameThe name of the flow.string
cid_groupsThe Caller ID groups associated with the number.array
idThe unique ID assigned to the Caller ID group when it was created.number
nameThe name of the Caller ID group.string
metadataInformation about the request settings and response content.object
totalThe number of phone numbers returned.number
pageThe page number.number
page_sizeThe number of phone numbers returned per page in the response.number

Response sample
#

{
  "numbers": [
    {
      "number": "1234567890",
      "created_at": "2023-07-24T15:50:21.208Z",
      "label": "My number",
      "country": "United States",
      "city": "City",
      "type": "geographic",
      "provider": "Voiso",
      "activation_fee": "1.23",
      "monthly_fee": "2.34",
      "script": {
        "flow": {
          "id": "16510ca2-7386-4829-ac6d-7f7c38a276d0",
          "name": "My Flow"
        },
        "cid_groups": [
          {
            "id": 2,
            "name": "My CID Group"
          }
        ]
      }
    }
  ],
  "metadata": {
    "total": 1,
    "page": 1,
    "page_size": 1
  }
}

Troubleshooting
#

The following issues are sometimes encountered:

Too many requests
#

If you see this error, "error": "API rate limit exceeded", reduce the number of API requests you send per second.

Unauthorized
#

The numbers API uses the contact center API key to validate the request. If you see this error, "error": "Invalid API key", check that you use the correct contact center API key. For more information about API keys, refer to Authentication.


Was this page helpful?

Thank you! Your feedback has been received.