[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-chats\u002Fmanagement\u002Funpin":3,"docs-tabs-chats\u002Fmanagement\u002Funpin":6},{"content":4,"lastmod":5},"## Unpin a chat\n\n`DELETE \u002Fv1\u002Fchats\u002F:dialogId\u002Fpin`\n\nUnpins a chat in the current user's dialog list: the chat returns to its position according to its last activity time. The chat's messages and members do not change.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `dialogId` (path) | string | yes | Dialog ID: a numeric user ID for a direct dialog, `chatXXX` for a group chat, `me` for the current user's own dialog. Pinned chats are the rows with `pinned: true` in [recent dialogs](\u002Fdocs\u002Fchats\u002Fdiscovery\u002Frecent) |\n\nNo 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 DELETE https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fchat456\u002Fpin \\\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\u002Fchat456\u002Fpin \\\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\u002Fchat456\u002Fpin', {\n  method: 'DELETE',\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\u002Fchat456\u002Fpin', {\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 chat is not pinned. A call for a chat that was not pinned also returns `true` |\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 `folderId` is not accepted by DELETE \u002Fv1\u002Fchats\u002F:dialogId\u002Fpin. 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| 404 | `ENTITY_NOT_FOUND` | Bitrix24 answered \"not found\"; the Bitrix24 code is in `error.b24Code` |\n| 502 | `ME_ALIAS_RESOLUTION_FAILED` | The user could not be resolved for the `me` alias |\n| 403 | `BITRIX_ACCESS_DENIED` | The user has no access to the chat |\n| 403 | `SCOPE_DENIED` | The API key does not have the `im` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | Read-only key: unpinning is 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**It removes a chat's pin, not a message's.** A message pinned inside a chat is unpinned through a separate path, `DELETE \u002Fv1\u002Fchats\u002Fmessages\u002F:messageId\u002Fpin`, with the message ID in the path.\n\n**The call may make you a member.** When the chat allows auto-join — for example, a comment chat, a collab or a task chat — the call adds the current user as a member, just as opening the chat in the Bitrix24 interface does.\n\n## See also\n\n- [Pin a chat](\u002Fdocs\u002Fchats\u002Fmanagement\u002Fpin)\n- [Pinned chat order](\u002Fdocs\u002Fchats\u002Fmanagement\u002Fpin-sort)\n- [Recent dialogs](\u002Fdocs\u002Fchats\u002Fdiscovery\u002Frecent)\n- [Chat management](\u002Fdocs\u002Fchats\u002Fmanagement)\n","2026-09-30",{},1794739542937]