[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-chats\u002Fsharing\u002Fguest-link-revoke":3,"docs-tabs-chats\u002Fsharing\u002Fguest-link-revoke":6},{"content":4,"lastmod":5},"## Revoke a guest link\n\n`DELETE \u002Fv1\u002Fchats\u002F:dialogId\u002Fguest-links`\n\nRevokes your guest link to the chat: its URL can no longer be used to join the chat. The link code is not needed; the dialog ID is enough.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `dialogId` (path) | string | yes | Dialog ID: `chatXXX` for a group chat, a numeric user ID for a private chat, `me` — your personal dialog. List — [`GET \u002Fv1\u002Fchats\u002Frecent`](\u002Fdocs\u002Fchats\u002Fdiscovery\u002Frecent) |\n\nThe request takes no body: body fields and query parameters are 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\u002Fchat42\u002Fguest-links\" \\\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\u002Fguest-links\" \\\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\u002Fguest-links', {\n  method: 'DELETE',\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\n\nconst { data } = await res.json()\nconsole.log('Revoked:', data.result)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fchat42\u002Fguest-links', {\n  method: 'DELETE',\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('Revoked:', 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 link is revoked |\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\n422 — there is no valid guest link:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"SHARING_LINK_NOT_FOUND\",\n    \"b24Code\": \"SHARING_LINK_NOT_FOUND\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | A body field or a query parameter was passed. Checked before any call to Bitrix24 |\n| 422 | `BITRIX_ERROR` | Bitrix24 returned an error; the portal code is in `error.b24Code`. `SHARING_LINK_NOT_FOUND` — you have no valid guest link, `GUEST_FEATURE_DISABLED` — guests are disabled on the portal, `CHAT_NOT_FOUND` — the chat does not exist on the portal |\n| 404 | `ENTITY_NOT_FOUND` | Bitrix24 answered with an unspecified \"not found\" code; the portal code is in `error.b24Code` |\n| 502 | `ME_ALIAS_RESOLUTION_FAILED` | Failed to resolve the user for the `me` alias |\n| 403 | `BITRIX_ACCESS_DENIED` | No right to manage the chat's guest links — Bitrix24 refused with the `ACCESS_DENIED` code |\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 general API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**Automatic chat membership.** The call can make the key owner a member of a chat that allows auto-join, even if the link operation is subsequently refused. A read-only key is blocked before Bitrix24 is called.\n\n**The revocation is visible in the chat.** After revocation, a system message saying that you revoked the guest link appears in the chat, and all members see it.\n\n**Guests who already joined are removed.** Revocation closes the old URL to new guests and removes from the chat guests who joined through it. Personal email and SMS invitations remain valid until `dateExpire`.\n\n## See also\n\n- [Get a guest link](\u002Fdocs\u002Fchats\u002Fsharing\u002Fguest-link)\n- [Regenerate a guest link](\u002Fdocs\u002Fchats\u002Fsharing\u002Fguest-link-regenerate)\n- [Revoke a link by code](\u002Fdocs\u002Fchats\u002Fsharing\u002Flink-revoke)\n- [Links and guests](\u002Fdocs\u002Fchats\u002Fsharing)\n","2026-10-01",{},1794739553684]