[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-chats\u002Fmanagement\u002Fdelete":3,"docs-tabs-chats\u002Fmanagement\u002Fdelete":6},{"content":4,"lastmod":5},"## Delete a chat\n\n`DELETE \u002Fv1\u002Fchats\u002F:dialogId`\n\n**Irreversible:** the chat is deleted for all members together with its messages and files, and it cannot be restored.\n\nThe response arrives before the chat disappears: the deletion runs as a background job, so the chat may still be readable for a few seconds after the response. A chat can be deleted by a member with the delete permission — the owner by default.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `dialogId` (path) | string | yes | Group chat ID as `chatN`, for example `chat42` — the `id` field of a [recent dialogs](\u002Fdocs\u002Fchats\u002Fdiscovery\u002Frecent) row. A personal dialog cannot be deleted |\n\nThe endpoint accepts no query string parameters and no request body: any parameter or body field is rejected with `400 INVALID_PARAMS` before any call to Bitrix24.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X DELETE https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fchat42 \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X DELETE https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fchat42 \\\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\u002Fchat42', {\n  method: 'DELETE',\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Deletion accepted:', data.result) \u002F\u002F true\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fchat42', {\n  method: 'DELETE',\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` — the deletion is accepted |\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\n403 — the caller has no permission to delete this chat:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ACCESS_DENIED\",\n    \"message\": \"ACCESS_DENIED\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | A query string parameter or a body field was sent — the endpoint accepts neither |\n| 403 | `BITRIX_ACCESS_DENIED` | No permission to delete this chat. An attempt to delete a personal dialog, a CRM entity chat or a collab chat gets the same answer, even from the collab chat's owner |\n| 404 | `ENTITY_NOT_FOUND` | Bitrix24 returned \"not found\". The Bitrix24 code is in `error.b24Code` |\n| 422 | `BITRIX_ERROR` | Bitrix24 returned an error. The Bitrix24 code is in `error.b24Code`. A nonexistent chat is reported here with `CHAT_NOT_FOUND` |\n| 502 | `BITRIX_UNAVAILABLE` | No explicit deletion confirmation was received, or Bitrix24 is unavailable |\n| 502 | `ME_ALIAS_RESOLUTION_FAILED` | Failed to resolve the user when using the `me` alias |\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\nThe full list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**A deleted chat cannot be addressed.** Once the background job has run, the chat card and the chat feed return `422 BITRIX_ERROR` with `error.b24Code` `CHAT_NOT_FOUND`. Any `dialogId` or `chatId` you stored for the deleted chat no longer points to anything.\n\n## See also\n\n- [Chat management](\u002Fdocs\u002Fchats\u002Fmanagement)\n- [Leave a chat](\u002Fdocs\u002Fchats\u002Fmanagement\u002Fleave)\n- [Create a group chat](\u002Fdocs\u002Fchats\u002Fmanagement\u002Fcreate)\n","2026-10-19",{},1794739539133]