[POST] .../v1/chatmessage/getaround
Returns a message window around the selected chat message. Use this method after search or pinned navigation to display a target message with nearby context before and after it. The request body is required, chat_id must identify the chat, id must identify the target message and public filters metadata exposes both fields as real request filters. The response returns a bounded array of ChatMessage records around the target, with limit_before and limit_after controlling context size and access scoped to the current request user's chat visibility. Missing body, missing chat_id or id, denied access, target message not found, private-message restrictions and database failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Optional | Optional filters by fields available for this API method. |
| include_staff_private | Boolean | Optional | Include private Staff messages if permitted. |
| limit_after | Int32 | Optional | Number of messages after the target message. |
| limit_before | Int32 | Optional | Number of messages before the target message. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| chat_id | string | Chat UUID. Required filter field. |
| id | string | Target message UUID. Required filter field. |
Request Example
{
"filters": [
{
"field": "chat_id",
"operator": "Equal",
"value": "8cdd646d-dbd0-45c0-8f5b-d90a9b000001"
},
{
"field": "id",
"operator": "Equal",
"value": "4b9727ec-a389-4274-95b6-069350000001"
}
],
"limit_before": 20,
"limit_after": 20
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Array of ChatMessage | Result array. |
Response Example
{
"ok": true,
"result": [
{
"id": "4b9727ec-a389-4274-95b6-069350000001",
"chat_id": "8cdd646d-dbd0-45c0-8f5b-d90a9b000001",
"author_entity_type": "User",
"author_entity_id": 42,
"message_type": "Regular",
"text": "Please review the supplier invoice.",
"created_date": 1767225600,
"last_update": 1767225600
}
]
}