External Number (/did/)

You can test API methods on the interactive API browser page and without writing code
Some of the resources described on the page may not be available by default due to the type of application (see Creating and authorizing applications).

This resource is intended for managing external client numbers. The resource allows you to get a list of external numbers available to the client and associate external numbers with internal ones.

Description of data structures

Name

Type

Description

Name

Type

Description

id 

long

ID of the external number

name 

string

The name of the external number, i.e. the number itself

domain

string

External number domain

client_id

long

ID of the client to which the external number is assigned

extension_id 

long

ID of the internal number to which the external number is assigned

allow_message 

boolean

This parameter indicates whether an external number is allowed to receive text messages

message_extension_id 

long

ID of the internal number to which the received text message will be sent

comment

string

Comment

create_date 

string

Creation date

Example

Let's get a list of external numbers available to the client:

System response:

[     {         "comment": "DID1",         "domain": null,         "create_date": "2020-05-21 15:53:52",         "name": "78123092631",         "extension_id": 149,         "client_id": 12,         "id": 6,         "allow_message": false,         "message_extension_id": null     }     {         "comment": "DID2",         "domain": null,         "create_date": "2020-05-21 15:58:05",         "name": "000104839",         "extension_id": null,         "client_id": 12,         "id": 10,         "allow_message": false,         "message_extension_id": null     }     ]

The request returned a list of two external numbers, one of which is already assigned to the internal number with ID 149. Assign the external number 000104839 to the internal number with the ID 30:

System response:

    {         "comment": "DID2",         "domain": null,         "create_date": "2020-05-21 15:58:05",         "name": "000104839",         "extension_id": 30,         "client_id": 12,         "id": 10,         "allow_message": false,         "message_extension_id": null     }

Resources of the "Client" section

GET /client/{client_id}/did/

Get a list of external client numbers

URL Parameters

Name

Type

Name

Type

client_id

string

Request parameters

Name

Type

Name

Type

domain

array [string]

name

array [string]

page

integer

extension_id

array [integer]

per_page

integer

id

array [integer]

Response fields

Name

Type

Name

Type

allow_message 

boolean

client_id

long

comment

string

create_date 

string

domain

object

extension_id

long

id

long

message_extension_id 

long

name

string

PUT /client/{client_id}/did/{did_id}

Update the external number

URL Parameters

Name

Type

Name

Type

did_id

integer

client_id

string

JSON parameters

Name

Type

Mandatory

Name

Type

Mandatory

extension_id

long

none

message_extension_id 

long

none

Response fields

Name

Type

Name

Type

allow_message 

boolean

client_id

long

comment

string

create_date 

string

domain

object

extension_id

long

id

long

message_extension_id 

long

name

string

GET /client/{client_id}/did/{did_id}

Get an external number

URL Parameters

Name

Type

Name

Type

did_id

integer

client_id

string

Response fields

Name

Type

Name

Type

allow_message 

boolean

client_id

long

comment

string

create_date 

string

domain

object

extension_id

long

id

long

message_extension_id 

long

name

string