[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-chats\u002Fmessages\u002Fcomments-read-all":3,"docs-tabs-chats\u002Fmessages\u002Fcomments-read-all":6},{"content":4,"lastmod":5},"## Mark all channel comments as read\n\n`POST \u002Fv1\u002Fchats\u002F:dialogId\u002Fcomments\u002Fread-all`\n\nMarks all comments on all posts in the channel as read for you.\n\n## Parameters\n\n| Parameter | Type | Required | Default | Description |\n|----------|-----|:-----:|-----------|---------|\n| `dialogId` (path) | string | yes | — | Dialog ID of the channel, `chatXXX` — the `dialogId` field of a [recent dialogs](\u002Fdocs\u002Fchats\u002Fdiscovery\u002Frecent) row. The `me` alias addresses your personal dialog, not a channel, and results in `422 WRONG_MESSAGE_TYPE` |\n\nNo body is needed. Query parameters and body fields 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\u002Fchat2000\u002Fcomments\u002Fread-all\" \\\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\u002Fchat2000\u002Fcomments\u002Fread-all\" \\\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\u002Fchat2000\u002Fcomments\u002Fread-all', {\n  method: 'POST',\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\n\nconst { data } = await res.json()\nconsole.log('Comments read:', data.result)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fchat2000\u002Fcomments\u002Fread-all', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { data } = await res.json()\nconsole.log('Comments read:', data.result)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data.result` | boolean | `true` — the channel comments were marked as read |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": { \"result\": true }\n}\n```\n\n## Error response example\n\n422 — the chat is not a channel:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"WRONG_MESSAGE_TYPE\",\n    \"b24Code\": \"WRONG_MESSAGE_TYPE\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | The body is not a JSON object, or a query parameter or body field was passed. Checked before any call to Bitrix24 |\n| 404 | `ENTITY_NOT_FOUND` | Bitrix24 returned a generic \"not found\" code or an error with the text \"not found\". The portal code is in `error.b24Code` |\n| 422 | `BITRIX_ERROR` | Bitrix24 returned an error, the portal code is in `error.b24Code`. `CHAT_NOT_FOUND` — there is no chat with this `dialogId`, `WRONG_MESSAGE_TYPE` — the chat is not a channel |\n| 403 | `SCOPE_DENIED` | The API key does not have the `im` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only: marking comments as read changes data — see [access rights](\u002Fdocs\u002Faccess-rights) |\n| 401 | `TOKEN_MISSING` | The API key has no Bitrix24 tokens configured |\n| 502 | `ME_ALIAS_RESOLUTION_FAILED` | Could not resolve the current user for `dialogId` = `me` |\n\nThe full list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**A repeated call is not an error.** The response is `true` even when the channel has no unread comments.\n\n## See also\n\n- [Comment summary for posts](\u002Fdocs\u002Fchats\u002Fmessages\u002Fcomments)\n- [Follow the comments of a post](\u002Fdocs\u002Fchats\u002Fmessages\u002Fcomments-subscription-create)\n- [Stop following the comments of a post](\u002Fdocs\u002Fchats\u002Fmessages\u002Fcomments-subscription-delete)\n- [Recent dialogs](\u002Fdocs\u002Fchats\u002Fdiscovery\u002Frecent)\n","2026-10-05",{},1795415434858]