[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-chats\u002Fmanagement\u002Fmute":3,"docs-tabs-chats\u002Fmanagement\u002Fmute":6},{"content":4,"lastmod":5},"\n## Chat notifications\n\n`POST \u002Fv1\u002Fchats\u002F:chatId\u002Fmute`\n\nTurns chat notifications off or back on for the user the call is made on behalf of. Other chat participants are not affected.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `chatId` (path) | number | yes | Chat ID, a positive integer. A CRM entity chat is found via [Find a CRM entity chat](\u002Fdocs\u002Fchats\u002Fdiscovery\u002Ffind) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `mute` | boolean | yes | `true` turns notifications off, `false` turns them back on |\n\nInstead of `mute`, you can send `MUTE` with the value `\"Y\"` or `\"N\"`, as Bitrix24 spells it. When both are sent, `mute` applies. Other body fields are not forwarded to Bitrix24.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002F456\u002Fmute \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"mute\": false}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002F456\u002Fmute \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"mute\": false}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002F456\u002Fmute', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ mute: false }),\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\u002F456\u002Fmute', {\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({ mute: false }),\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.chatId` | number | Chat ID from the request |\n| `data.muted` | boolean | The state that was set: `true` means notifications are off, `false` means they are on |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"chatId\": 456,\n    \"muted\": false\n  }\n}\n```\n\n## Error response example\n\n400 — the body has no `mute` field:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"MISSING_PARAMS\",\n    \"message\": \"Body field `mute` (boolean) is required: true switches the chat notifications off, false switches them back on.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_CHAT_ID` | `chatId` is not a positive integer — checked before the Bitrix24 call |\n| 400 | `MISSING_PARAMS` | The body has no `mute`, including a request without a body. Nothing is sent to Bitrix24 |\n| 400 | `INVALID_PARAMS` | `mute` is not `true` \u002F `false`, and `MUTE` is not `\"Y\"` \u002F `\"N\"`. Nothing is sent to Bitrix24 |\n| 404 | `CHAT_NOT_FOUND_OR_NO_ACCESS` | The chat does not exist, the user is not a member, or notifications for this chat cannot be turned off |\n| 403 | `SCOPE_DENIED` | The API key lacks the `im` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only — changing notification settings counts as a write |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\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 setting is personal.** Notifications change only for the user the call is made on behalf of. With a personal key, that is the key owner. To change the setting for an employee who opened your application, call the endpoint with the application key and that employee's `vibe_session_*` session in the `Authorization` header, as in the OAuth application examples. An administrator key cannot turn notifications off on someone else's behalf.\n\n**An employee session lasts 24 hours.** A `vibe_session_*` session appears when the employee opens the application and stays valid for a day. If your application reacts to a Bitrix24 event, such as an observer being added to a task, an employee who has not opened the application recently has no valid session, and a call on their behalf fails. Change the setting while the employee has opened the application themselves.\n\n**`mute` is required.** The field is never guessed: a request without it is refused before the Bitrix24 call. This way a request that lost the field does not turn notifications off when it meant to turn them on.\n\n## See also\n\n- [Leave a chat](\u002Fdocs\u002Fchats\u002Fmanagement\u002Fleave)\n- [Find a CRM entity chat](\u002Fdocs\u002Fchats\u002Fdiscovery\u002Ffind)\n- [Chat management](\u002Fdocs\u002Fchats\u002Fmanagement)\n","2026-10-15",{},1794739541017]