Skip to content

Virtual Numbers API

Open API playground All endpoints

Phone numbers that Teler provisions for your account. List, assign to a voice app or SIP trunk, unassign, or update individual numbers.

List virtual numbers

GET/api/v1/virtual-numbers

Auth: x-api-key header

Parameters

NameInTypeDescription
limitqueryinteger
searchquerystring | null
locationqueryarray of string | null
voice_appqueryarray of string | null
sip_trunkqueryarray of string | null
cursor_afterquerystring | null
cursor_beforequerystring | null

Responses

StatusDescription
200

Successful Response

422

Validation Error

Example response (200)
{
  "data": [
    {
      "id": "string",
      "account_id": "string",
      "name": "string",
      "number": "string",
      "location": {
        "id": "string",
        "name": "string",
        "region_code": "string",
        "country_code": "string",
        "country_name": "string"
      },
      "voice_app": {
        "id": "string",
        "name": "string"
      },
      "sip_trunk": {
        "id": "string",
        "name": "string"
      }
    }
  ],
  "next_cursor": "string",
  "previous_cursor": "string",
  "has_more": false
}

Assign virtual numbers

POST/api/v1/virtual-numbers/assign

Auth: x-api-key header

Parameters

NameInTypeDescription
searchquerystring | null
locationqueryarray of string | null
voice_appqueryarray of string | null
sip_trunkqueryarray of string | null

Request body

vn_idsarray of string | null
apply_to_allboolean | null
voice_app_idstring | null
sip_trunk_idstring | null
Example request
{
  "vn_ids": [
    "string"
  ],
  "apply_to_all": false,
  "voice_app_id": "string",
  "sip_trunk_id": "string"
}

Responses

StatusDescription
200

Successful Response

422

Validation Error

Example response (200)
{
  "success": true,
  "message": "string"
}

Unassign virtual numbers

POST/api/v1/virtual-numbers/unassign

Auth: x-api-key header

Parameters

NameInTypeDescription
searchquerystring | null
locationqueryarray of string | null
voice_appqueryarray of string | null
sip_trunkqueryarray of string | null

Request body

vn_idsarray of string | null
apply_to_allboolean | null
Example request
{
  "vn_ids": [
    "string"
  ],
  "apply_to_all": false
}

Responses

StatusDescription
200

Successful Response

422

Validation Error

Example response (200)
{
  "success": true,
  "message": "string"
}

Update a virtual number

PATCH/api/v1/virtual-numbers/{vn_id}

Auth: x-api-key header

Parameters

NameInTypeDescription
vn_id requiredpathstring

Request body

namestring | null
Example request
{
  "name": "string"
}

Responses

StatusDescription
200

Successful Response

422

Validation Error

Example response (200)
{
  "id": "string",
  "name": "string",
  "number": "string",
  "sip_trunk": {
    "id": "string",
    "name": "string"
  },
  "voice_app": {
    "id": "string",
    "name": "string"
  },
  "location": {
    "id": "string",
    "name": "string",
    "region_code": "string",
    "country_code": "string",
    "country_name": "string"
  }
}