VonyxDocs

List your numbers

The live Vonyx numbers on your account, to place calls from.

View this page as Markdown

GET https://api.vocalstack.site/v1/numbers
Authorization: Bearer YOUR_TOKEN

Send the token from your API key (Authentication). There are no parameters and no body: the token says whose numbers to list.

curl https://api.vocalstack.site/v1/numbers \
  -H 'Authorization: Bearer YOUR_TOKEN'

Response

{
  "status": 200,
  "message": "numbers",
  "data": {
    "numbers": [
      { "did": "919876543210", "sub_account_id": null },
      { "did": "918012345678", "sub_account_id": "c1d2e3f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f" }
    ]
  }
}
FieldDescription
data.numbersYour live Vonyx numbers, in number order. An empty list [] when you have none.
didThe number: 91 followed by the 10-digit number. Use it as did when you place a call.
sub_account_idThe sub-account the number belongs to, or null when it is in none.

Only numbers that are live on your account are listed. A number that was released, or is not live yet, is not in the list and cannot place calls.

Errors

Every reply is JSON: {"status": <code>, "message": "...", "error": "..."}, with data instead of error on success.

HTTPmessageerrorWhat to do
401Unauthorizedsend Authorization: Bearer YOUR_TOKENThe Authorization header is missing or not in the form Bearer YOUR_TOKEN.
401Unauthorizedinvalid or expired tokenGet a new token (Authentication) and send the request again.
405Method not alloweduse GETUse GET.
429Too many requestsat most 5 requests a second; retry shortlyMore than 5 requests a second from your IP address. Wait a second and retry.
503Authentication unavailableretry laterYour token could not be checked at that moment. Try again after a few seconds.
503Number lookup failedretry laterA temporary problem. Try again after a few seconds.

On this page