Agent Private Message
  • 28 Jul 2022
  • 1 Minute to read
  • Dark
    Light

Agent Private Message

  • Dark
    Light

Article summary

Agent Private Message

Agent Private Message JSON Format

Agent Private Message is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idintegerId of the private message.
formAgentIdguidId of the sender agent.
toAgentIdguidId of the recipient agent.
contentstringContent of the private message.
attachmentFileKeystringKey value of the attachment.
timedatetimeTime of the private message.

Search Agent Private Messages

POST livechat/agentPrivateMessages:Search

  • Parameters:

NameTypeinRequiredDescription
pageIndexintegerquerynoPage index.
filtersarraybodyYesFilter array. Available items are: time, agent,keywords.
pageSizeintegerquerynoPage size.
includestringquerynoAvailable 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?