For AI agents: markdown of this page — /docs-content-en/chats/members/managers-remove.md documentation index — /llms.txt

Remove managers

DELETE /v1/chats/:dialogId/managers

Takes the manager role away from the given users. They stay in the chat as members. Only a new assignment gives the role back.

Parameters

Parameter Type Required Description
ParameterdialogId (path) Typestring Requiredyes DescriptionGroup chat identifier chatXXX. A personal dialog is rejected
ParameteruserIds (query) Typestring Requiredyes DescriptionFrom 1 to 50 user IDs separated by commas, for example 5,7. Each is a positive integer without spaces or leading zeros. A repeated ID is allowed and counts toward the 50

The request takes no body: a body field, another parameter or a repeated parameter is rejected with 400 INVALID_PARAMS.

Examples

curl — personal key

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/chat42/managers?userIds=7" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl -X DELETE "https://vibecode.bitrix24.com/v1/chats/chat42/managers?userIds=7" \
  -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/managers?userIds=7', {
  method: 'DELETE',
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})

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

JavaScript — OAuth application

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

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

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.result Typeboolean Descriptiontrue — the request was carried out. It does not confirm that each of the given users was a manager

Response example

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

Error response example

400 — IDs in the wrong format:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "`userIds` must be 1-50 Bitrix24 user ids separated by commas (4,7), each a positive integer without spaces or leading zeros."
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionuserIds is absent, holds more than 50 IDs or an ID that is not a positive integer; another parameter, a repeated parameter or a body field. Checked before any call to Bitrix24
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionNo right to change the managers, or dialogId is a personal dialog
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
HTTP404 CodeENTITY_NOT_FOUND DescriptionBitrix24 returned "not found"; the portal code is in error.b24Code
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 returned an error; the portal code is in error.b24Code. A missing chat lands here with the code CHAT_NOT_FOUND
HTTP502 CodeME_ALIAS_RESOLUTION_FAILED DescriptionThe user could not be resolved for the me alias

The full list of common API errors — Errors.

Known specifics

The IDs go in the query. A DELETE body does not pass through every proxy, so the list is passed in the query string.

A user without the role is skipped without an error, and the response stays the same. The membership records show the result.

See also