[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-chats\u002Fmessages\u002Fmark":3,"docs-tabs-chats\u002Fmessages\u002Fmark":6},{"content":4,"lastmod":5},"## Read later\n\n`POST \u002Fv1\u002Fchats\u002Fmessages\u002F:messageId\u002Fmark`\n\nMarks the message's chat as unread and points the mark at this message — the \"Read later\" command in the Bitrix24 interface. The chat is resolved from the message, so no `dialogId` is needed. [Loading a chat](\u002Fdocs\u002Fchats\u002Fmessages\u002Fload) returns the marked message as `data.chat.markedId`: the interface opens the chat at that message.\n\n[`DELETE \u002Fv1\u002Fchats\u002F:dialogId\u002Funread`](\u002Fdocs\u002Fchats\u002Fmanagement\u002Funread-delete) clears the mark together with the pointer.\n\n## Parameters\n\n| Parameter | Type | Required | Default | Description |\n|----------|-----|:-----:|-----------|---------|\n| `messageId` (path) | number | yes | — | Message ID, a positive integer — the `id` field of a message from the [message history](\u002Fdocs\u002Fchats\u002Fmessages\u002Flist) or [chat loading](\u002Fdocs\u002Fchats\u002Fmessages\u002Fload) |\n\nThere are no query parameters and no body fields. Any query parameter or body field is rejected with `400 INVALID_PARAMS`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fmessages\u002F1002\u002Fmark\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fmessages\u002F1002\u002Fmark\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fmessages\u002F1002\u002Fmark', {\n  method: 'POST',\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\n\nconst { success } = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fmessages\u002F1002\u002Fmark', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | array | An empty array |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": []\n}\n```\n\n## Error response example\n\n422 — the message's chat is not in the recent dialog list:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"MESSAGE_MARK_FAILED\",\n    \"b24Code\": \"MESSAGE_MARK_FAILED\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | `messageId` is not a positive integer, a query parameter or a body field was sent, or the body is not a JSON object. Checked before any call to Bitrix24 |\n| 403 | `SCOPE_DENIED` | The API key does not have the `im` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only — the call changes the chat state. Rejected before any call to Bitrix24 |\n| 401 | `TOKEN_MISSING` | The API key has no Bitrix24 tokens configured |\n| 404 | `ENTITY_NOT_FOUND` | Bitrix24 answered \"not found\"; the portal code is in `error.b24Code` |\n| 422 | `BITRIX_ERROR` | Bitrix24 returned an error; the portal code is in `error.b24Code`. A message that does not exist — `MESSAGE_NOT_FOUND`; a chat outside the recent dialog list — `MESSAGE_MARK_FAILED` |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned a server error |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- The mark is set on the chat's row in the recent dialog list. When the chat is hidden from the list, Bitrix24 refuses the call with the code `MESSAGE_MARK_FAILED`; the row returns to the list when a new message arrives in the chat.\n- **A marked chat is not marked again.** When the chat is already marked as unread — by an earlier \"read later\" or by [`POST \u002Fv1\u002Fchats\u002F:dialogId\u002Funread`](\u002Fdocs\u002Fchats\u002Fmanagement\u002Funread-create) — Bitrix24 leaves the mark and the pointer as they are and returns success. To point the mark at another message, first clear it with `DELETE \u002Fv1\u002Fchats\u002F:dialogId\u002Funread`, then call this endpoint.\n\n## See also\n\n- [Set the \"unread\" mark](\u002Fdocs\u002Fchats\u002Fmanagement\u002Funread-create)\n- [Clear the \"unread\" mark](\u002Fdocs\u002Fchats\u002Fmanagement\u002Funread-delete)\n- [Load a chat](\u002Fdocs\u002Fchats\u002Fmessages\u002Fload)\n- [Messages around a message](\u002Fdocs\u002Fchats\u002Fmessages\u002Fcontext)\n- [Messages](\u002Fdocs\u002Fchats\u002Fmessages)\n","2026-10-06",{},1794739548250]