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
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | |
search | query | string | null | |
location | query | array of string | null | |
voice_app | query | array of string | null | |
sip_trunk | query | array of string | null | |
cursor_after | query | string | null | |
cursor_before | query | string | null |
Responses
| Status | Description |
|---|---|
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
| Name | In | Type | Description |
|---|---|---|---|
search | query | string | null | |
location | query | array of string | null | |
voice_app | query | array of string | null | |
sip_trunk | query | array of string | null |
Request body
vn_idsarray of string | nullapply_to_allboolean | nullvoice_app_idstring | nullsip_trunk_idstring | nullExample request
{
"vn_ids": [
"string"
],
"apply_to_all": false,
"voice_app_id": "string",
"sip_trunk_id": "string"
}Responses
| Status | Description |
|---|---|
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
| Name | In | Type | Description |
|---|---|---|---|
search | query | string | null | |
location | query | array of string | null | |
voice_app | query | array of string | null | |
sip_trunk | query | array of string | null |
Request body
vn_idsarray of string | nullapply_to_allboolean | nullExample request
{
"vn_ids": [
"string"
],
"apply_to_all": false
}Responses
| Status | Description |
|---|---|
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
| Name | In | Type | Description |
|---|---|---|---|
vn_id required | path | string |
Request body
namestring | nullExample request
{
"name": "string"
}Responses
| Status | Description |
|---|---|
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"
}
}