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 |
---|---|---|
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
    }