Table of Contents | ||
---|---|---|
|
Channels
Internal chat
Send a message
Чаты
Информация о чате
...
Значение | Комментарии | |
---|---|---|
Путь |
/public/api/ |
...
v1/ |
...
chats/ |
...
channel |
...
Request
Result
int64
— a message id.
Mark messages as received
...
/ |
...
chat/ |
...
:channelName |
...
Тело запроса | FieldПустое | |
Тело ответа | DescriptionResponse<Chat> | |
MessageIds | []int64 | An array of message ids to mark as received. |
Result
void
— an empty result.
Mark messages as read
Code Block |
---|
POST /public/api/chat/read |
Params
...
Result
void
— an empty result
Query messages
Query messages in an internal chat, the messages are ordered by ids.
Code Block |
---|
POST /public/api/chat/query_messages |
Params
...
Specifies the sort direction:
- Ascending order: 0, 1, 2, 3.
- Descending order: 3, 2, 1, 0.
...
Пример:
Code Block | ||
---|---|---|
| ||
{
"OK": true,
"Error": null,
"Result": {
"Id": 10,
"ProjectId": 1,
"ClientId": 11,
"ChannelId": 1,
"TicketId": 68,
"EventId": 3645,
"ClientUnread": 5,
"CreatedAt": 1498085875177,
"ChangedAt": 1518091061880
},
"Rels": {
"Clients": [
{
"Id": 11,
"ProjectId": 1,
"CompanyId": 2,
"Type": "crm",
"Name": "Дмитрий Менделеев",
"Online": true,
"CustomerId": 5,
"ChannelId": null,
"TelegramId": null,
"FacebookId": null,
"VKId": null,
"TotalTickets": 2,
"TotalOpenTickets": 1,
"CreatedAt": 1498085866873,
"UpdatedAt": 1518164918835,
"SeenAt": 1518164918835,
"MessagedAt": null,
"IntegrationId": "10"
}
]
}
} |
Result
...