You can test API methods in the API online browser page on the interactive API browser page and without writing any code
Some of the resources described in on the page may not be available by default due to the type of application type (see Application Creation and Authorization)see Creating and authorizing applications).
Messages
It is the resource to manage extension number messages. Using the resource /message/, you can:
Send message: POST /extension/{extension_id}/message/send/
Get messages (statistics): GET /extension/{extension_id}/message/, or the specific message by its ID — GET /extension/{extension_id}/message/{message_id}
Mark message (is read or not): PUT /extension/{extension_id}/message/{message_id}
Delete message: DELETE /extension/{extension_id}/message/{message_id}
Description of Data Structures
Expand | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||
|
Message Events
The message events are configured similarly to other extension other
Event message-in
Name | Type | Description |
---|---|---|
extension_name | string | Name of the called extension number (in the form xxx*yyy@domain) |
did_number | string | Public number of the callee that is configured to receive messages |
src_number | string | Number of the message sender |
extension_id | integer | Identifier of the extension number |
text | string | Text of the message |
Event message-out
Name | Type | Description |
---|---|---|
extension_name | string | Name of the called extension number (in the form xxx*yyy@domain) |
src_number | string | Public number of the subscriber (DID) that is configured to receive messages |
extension_id | int | Identifier of the extension number |
dst_number | string | Number of the message recipient |
text | string | Text of the message |
The message message-out-status is similar to the message message-out, except for
Name | Type | Description |
---|---|---|
extension_name | string | Name of the called extension number (in the form xxx*yyy) |
status | string | Message sending status, may be either sent or failed |
Messages and SIP MESSAGE
When there is an incoming message (message-in) to the equipment of extension numbers of type 'phone', SIP MESSAGE is duplicated, and it may be read in the device if the device of extension number type 'phone' supports SIP MESSAGE.
Outgoing messages SIP MESSAGE from equipment of the 'phone' type extension numbers are supported.
The SIP MESSAGE exchange within the PBX does not appear in the chats.
"Extension Number” Section Resources
Expand | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||
GET /extension/{extension_id}/message/ Get the extension number messages URL Options
Request Options
Response Options
|
Expand | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
POST /extension/{extension_id}/message/send/ Send the message URL Options
Request Options
Response Options
|
Expand | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
GET /extension/{extension_id}/message/{message_id} Get (read) the message URL Options
Response Options
|
Expand | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||
PUT /extension/{extension_id}/message/{message_id} Mark the message as been read URL Options
Request Options
Response Options
|
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
DELETE /extension/{extension_id}/message/{message_id} Delete the message URL Options
|
Chats
Using the resource /chat/, you can:
Get list of chats: GET /extension/{extension_id}/chat/
Get information about the recent chat messages: GET /extension/{extension_id}/chat/{chat_id}
Delete chat: DELETE /extension/{extension_id}/chat/{chat_id}
Get list of chat messages: GET /extension/{extension_id}/chat/{chat_id}/messages/
Mark chat messages as read: PUT /extension/{extension_id}/chat/{chat_id}/messages/
Delete all chat messages: DELETE /extension/{extension_id}/chat/{chat_id}/messages/
Description of Data Structures
Expand | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
|
"Extension Number” Section Resources
Expand | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||
GET /extension/{extension_id}/chat/ Get the chat list URL Options
Request Options
Response Options
|
Expand | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
GET /extension/{extension_id}/chat/{chat_id} Get information about the recent chat messages URL Options
Response Options
|
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
DELETE /extension/{extension_id}/chat/{chat_id} Delete the chat URL Options
|
Expand | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||
GET /extension/{extension_id}/chat/{chat_id}/messages/ Get the chat message list URL Options
Request Options
Response Options
|
Expand | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
PUT /extension/{extension_id}/chat/{chat_id}/messages/ Set the chat messages as "read" URL Options
Request Options
Response Options
|
Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
DELETE /extension/{extension_id}/chat/{chat_id}/messages/ Delete the chat messages URL Options
|