[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-chats\u002Fmanagement\u002Fread-all":3,"docs-tabs-chats\u002Fmanagement\u002Fread-all":6},{"content":4,"lastmod":5},"## Read all chats\n\n`POST \u002Fv1\u002Fchats\u002Fread-all`\n\nMarks every message in every chat of the current user as read and resets the user's unread counters. Use it for a \"Read all\" button in the dialog list.\n\n**Important:** the call cannot be undone. The \"unread\" marks and counters of all the user's chats are reset at once, and there is no way to restore them. To read part of the list, use [Read a list section](\u002Fdocs\u002Fchats\u002Fmanagement\u002Fread-section); for one dialog, use [Mark as read](\u002Fdocs\u002Fchats\u002Fmessages\u002Fread).\n\n## Parameters\n\nThere are no parameters. No request body is sent. 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\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\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\u002Fread-all', {\n  method: 'POST',\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\n\nconst { success, data } = await res.json()\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fread-all', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data.result` | boolean | `true` — all of the user's chats are read |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"result\": true\n  }\n}\n```\n\n## Error response example\n\n400 — a request body was passed:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"Body field `all` is not accepted by POST \u002Fv1\u002Fchats\u002Fread-all. It takes no body fields.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | A query parameter or a body field was passed. Checked before the Bitrix24 call |\n| 422 | `BITRIX_ERROR` | Bitrix24 returned an error; the Bitrix24 code is in `error.b24Code` |\n| 403 | `SCOPE_DENIED` | The API key does not have the `im` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | Read-only key: marking as read counts as a write, see [access rights](\u002Fdocs\u002Faccess-rights) |\n| 401 | `TOKEN_MISSING` | The API key has no Bitrix24 tokens configured |\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**Marking as read is personal.** Only the counters of the user the call is made on behalf of are reset. With a personal key, that is the key owner; with an application key and a `vibe_session_*` session, it is the employee who opened the application.\n\n## See also\n\n- [Read a list section](\u002Fdocs\u002Fchats\u002Fmanagement\u002Fread-section)\n- [Mark as read](\u002Fdocs\u002Fchats\u002Fmessages\u002Fread)\n- [Unread counters](\u002Fdocs\u002Fchats\u002Fdiscovery\u002Fcounters)\n- [Chat management](\u002Fdocs\u002Fchats\u002Fmanagement)\n","2026-09-30",{},1794739542530]