For AI agents: markdown of this page — /docs-content-en/bots/chats/manager-delete.md documentation index — /llms.txt

Remove managers

DELETE /v1/bots/:botId/chats/:dialogId/managers

Removes the manager role from the specified users. The bot must be the chat owner.

Request fields (body)

Parameter Type Req. Description
userIds number[] yes Array of user IDs to remove the manager role from

Examples

curl — personal key

Terminal
curl -X DELETE https://vibecode.bitrix24.com/v1/bots/42/chats/chat456/managers \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "userIds": [5] }'

curl — OAuth application

Terminal
curl -X DELETE https://vibecode.bitrix24.com/v1/bots/42/chats/chat456/managers \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "userIds": [5] }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bots/42/chats/chat456/managers', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ userIds: [5] }),
})

const { success, data } = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bots/42/chats/chat456/managers', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ userIds: [5] }),
})

const { success, data } = await res.json()

Response fields

Field Type Description
data.result boolean true on a successful role removal

Response example

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

Error response example

502 — the bot is not the chat owner:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "You are not the owner of this chat"
  }
}

Errors

HTTP Code Description
400 INVALID_BOT_ID botId is not a number
404 BOT_NOT_FOUND No bot found with this ID
403 BOT_ACCESS_DENIED The bot belongs to another API key
502 BITRIX_ERROR Bitrix24 error (the bot is not the chat owner)
403 SCOPE_DENIED The API key does not have the imbot scope
401 TOKEN_MISSING The API key has no configured tokens

Full list of common API errors — Errors.

Known specifics

Owner only: only the chat owner can remove the manager role.

See also