For AI agents: markdown of this page — /docs-content-en/chats/sharing/guest-link-revoke.md documentation index — /llms.txt

Revoke a guest link

DELETE /v1/chats/:dialogId/guest-links

Revokes 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.

Parameters

Parameter Type Required Description
ParameterdialogId (path) Typestring Requiredyes DescriptionDialog ID: chatXXX for a group chat, a numeric user ID for a private chat, me — your personal dialog. List — GET /v1/chats/recent

The request takes no body: body fields and query parameters are rejected with 400 INVALID_PARAMS.

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/chat42/guest-links" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/chat42/guest-links" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/chat42/guest-links', {
  method: 'DELETE',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

const { data } = await res.json()
console.log('Revoked:', data.result)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/chat42/guest-links', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { data } = await res.json()
console.log('Revoked:', data.result)

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.result Typeboolean Descriptiontrue — the link is revoked

Response example

JSON
{
  "success": true,
  "data": {
    "result": true
  }
}

Error response example

422 — there is no valid guest link:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "SHARING_LINK_NOT_FOUND",
    "b24Code": "SHARING_LINK_NOT_FOUND"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionA body field or a query parameter was passed. Checked before any call to Bitrix24
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 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
HTTP404 CodeENTITY_NOT_FOUND DescriptionBitrix24 answered with an unspecified "not found" code; the portal code is in error.b24Code
HTTP502 CodeME_ALIAS_RESOLUTION_FAILED DescriptionFailed to resolve the user for the me alias
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionNo right to manage the chat's guest links — Bitrix24 refused with the ACCESS_DENIED code
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the im scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only — see access rights
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no Bitrix24 tokens configured

The full list of general API errors — Errors.

Known specifics

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.

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.

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.

See also