Agent Private Message
- 28 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Agent Private Message
- Updated on 28 Jul 2022
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Agent Private Message
Agent Private Messages
- Agent Private Messages ManagePOST livechat/agentPrivateMessages:Search
- Search Agent Private Messages
Agent Private Message JSON Format
Agent Private Message is represented as simple flat JSON objects with the following keys:
Name | Type | Description |
---|---|---|
id | integer | Id of the private message. |
formAgentId | guid | Id of the sender agent. |
toAgentId | guid | Id of the recipient agent. |
content | string | Content of the private message. |
attachmentFileKey | string | Key value of the attachment. |
time | datetime | Time of the private message. |
Search Agent Private Messages
POST livechat/agentPrivateMessages:Search
Parameters:
Name | Type | in | Required | Description |
---|---|---|---|---|
pageIndex | integer | query | no | Page index. |
filters | array | body | Yes | Filter array. Available items are: time, agent,keywords. |
pageSize | integer | query | no | Page size. |
include | string | query | no | Available values for Include are: "fromAgent", "toAgent". |
Response:
An array of Agent Private Message
Example
Sample Request:
curl https://api11.comm100.io/v4/livechat/agentPrivateMessages:search \
-X 'POST' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-D '{"filters":[{"name":"time","operator":"is","value":["2021-04-24T07:00:00.000Z","2021-04-25T07:00:00.000Z"]},{"name":"keywords","operator":"is","value":["hello"]}]}'
Response:
HTTP/1.1 200 OK
{
"total": 1,
"pageCount": 1,
"list": [
{
"id": 42,
"fromAgentId": "ebb24a78-8eb6-43de-bcbb-199a94538fd5",
"toAgentId": "803b0838-eb75-481c-a0ea-bc7a75ff0564",
"text": "hello",
"messageType": "text",
"attachmentFileKey": "",
"time": "2021-11-25T10:35:40.6472696Z"
}
],
"pageIndex": 0,
"pageSize": 10
}
Was this article helpful?