--- title: "Agent Private Message" slug: "server-api-livechat-agent-private-message" updated: 2022-07-28T09:24:08Z published: 2022-07-28T09:24:08Z canonical: "developer.comm100.com/server-api-livechat-agent-private-message" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Agent Private Message ## Agent Private Message - `Agent Private Messages` - Agent Private Messages Manage - `POST livechat/agentPrivateMessages:Search` - [Search Agent Private Messages](/docs/server-api-livechat-agent-private-message#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](/docs/server-api-livechat-agent-private-message#agent-private-message-json-format) - #### 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 } ```