[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-chats\u002Fmessages\u002Fanchors-messages":3,"docs-tabs-chats\u002Fmessages\u002Fanchors-messages":6},{"content":4,"lastmod":5},"## Remove message anchors\n\n`POST \u002Fv1\u002Fchats\u002Fanchors\u002Fread`\n\nRemoves your anchors on the given messages. For what an anchor is and how to remove all anchors in a chat, see [`POST \u002Fv1\u002Fchats\u002F:dialogId\u002Fanchors\u002Fread`](\u002Fdocs\u002Fchats\u002Fmessages\u002Fanchors).\n\n## Request body fields\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `messageIds` | number[] | yes | IDs of messages in one chat: 1 to 100 items, each a positive integer. The IDs come from the [chat feed](\u002Fdocs\u002Fchats\u002Fmessages\u002Flist) |\n\nOther body fields and query parameters are 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\u002Fanchors\u002Fread\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"messageIds\": [1001, 1002] }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fanchors\u002Fread\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"messageIds\": [1001, 1002] }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fanchors\u002Fread', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ messageIds: [1001, 1002] }),\n})\n\nconst { success } = await res.json()\nconsole.log('Anchors removed:', success)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fanchors\u002Fread', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ messageIds: [1001, 1002] }),\n})\n\nconst { success } = await res.json()\nconsole.log('Anchors removed:', success)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | boolean | `true`, even when there was nothing to remove |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": true\n}\n```\n\n## Error response example\n\n422 — the messages belong to different chats:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"MESSAGES_IN_DIFFERENT_CHAT_ERROR\",\n    \"b24Code\": \"MESSAGES_IN_DIFFERENT_CHAT_ERROR\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | `messageIds` is missing, not an array, empty, has more than 100 items or contains an item that is not a positive integer. Also a query parameter or an extra body field. Checked before any call to Bitrix24 |\n| 404 | `ENTITY_NOT_FOUND` | Bitrix24 returned \"not found\"; the portal code is in `error.b24Code` |\n| 422 | `BITRIX_ERROR` | Bitrix24 returned an error; the portal code is in `error.b24Code`. `MESSAGES_IN_DIFFERENT_CHAT_ERROR` — the messages belong to different chats |\n| 403 | `SCOPE_DENIED` | The API key does not have the `im` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only — see [access rights](\u002Fdocs\u002Faccess-rights) |\n| 401 | `TOKEN_MISSING` | The API key has no Bitrix24 tokens configured |\n\nFor the full list of common API errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**This is a write operation, even though the method is called `read`.** The call deletes marks, so a read-only key gets `403 WRITE_BLOCKED_READONLY_KEY` before any call to Bitrix24.\n\n**Messages are not marked as read.** Removing anchors does not move the read marker — to do that, [mark the messages as read](\u002Fdocs\u002Fchats\u002Fmessages\u002Fread-messages).\n\n## See also\n\n- [Remove chat anchors](\u002Fdocs\u002Fchats\u002Fmessages\u002Fanchors)\n- [Mark messages as read](\u002Fdocs\u002Fchats\u002Fmessages\u002Fread-messages)\n- [Messages around a message](\u002Fdocs\u002Fchats\u002Fmessages\u002Fcontext)\n","2026-10-07",{},1795415433587]