[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-bots\u002Fchats\u002Fmanager-add":3,"docs-tabs-bots\u002Fchats\u002Fmanager-add":6},{"content":4,"lastmod":5},"\n## Add managers\n\n`POST \u002Fv1\u002Fbots\u002F:botId\u002Fchats\u002F:dialogId\u002Fmanagers`\n\nAssigns users as chat managers. Managers have extended rights: they can manage participants and settings. The bot must be the chat owner.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `botId` (path) | number | yes | Bot ID. List: [`GET \u002Fv1\u002Fbots`](\u002Fdocs\u002Fbots\u002Fmanagement\u002Flist) |\n| `dialogId` (path) | string | yes | Group chat ID in the form `chatXXX`. It arrives in the `data.chat.dialogId` field of the [`POST \u002Fv1\u002Fbots\u002F:botId\u002Fchats`](\u002Fdocs\u002Fbots\u002Fchats\u002Fcreate) response and in the `chat.dialogId` field of [bot events](\u002Fdocs\u002Fbots\u002Fevents\u002Fbot-events) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `userIds` | number[] | yes | Array of user IDs to assign as managers. Chat participant list: [`GET \u002Fv1\u002Fbots\u002F:botId\u002Fchats\u002F:dialogId\u002Fusers`](\u002Fdocs\u002Fbots\u002Fchats\u002Fuser-list), field `data[].id` |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbots\u002F42\u002Fchats\u002Fchat456\u002Fmanagers \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"userIds\": [5, 12] }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbots\u002F42\u002Fchats\u002Fchat456\u002Fmanagers \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{ \"userIds\": [5, 12] }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbots\u002F42\u002Fchats\u002Fchat456\u002Fmanagers', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ userIds: [5, 12] }),\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\u002Fbots\u002F42\u002Fchats\u002Fchat456\u002Fmanagers', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ userIds: [5, 12] }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `data.result` | boolean | `true` on a successful assignment |\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\n403 — the bot lacks rights to manage the chat:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ACCESS_DENIED\",\n    \"message\": \"Access denied\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_BOT_ID` | `botId` is not a number |\n| 404 | `BOT_NOT_FOUND` | No bot found with this ID |\n| 403 | `BOT_ACCESS_DENIED` | The bot belongs to another API key |\n| 403 | `BITRIX_ACCESS_DENIED` | The bot is not a participant of the chat or lacks rights — the owner role is required |\n| 422 | `BITRIX_ERROR` | Another Bitrix24 error, text in `message` |\n| 403 | `SCOPE_DENIED` | The API key does not have the `imbot` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only — see [access rights](\u002Fdocs\u002Faccess-rights) |\n| 410 | `BOT_DISABLED` | The bot is disabled and does not process API calls. How to restore it — [Bot disabled](\u002Fdocs\u002Fbots\u002Ftroubleshooting#bot-disabled-bot_disabled) |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**Additive operation:** new managers are added to the existing ones rather than replacing them.\n\n**Users not in the chat are ignored:** if `userIds` contains IDs of users who are not chat participants, they are skipped without an error.\n\n## See also\n\n- [Remove managers](\u002Fdocs\u002Fbots\u002Fchats\u002Fmanager-delete)\n- [List participants](\u002Fdocs\u002Fbots\u002Fchats\u002Fuser-list)\n- [Assign an owner](\u002Fdocs\u002Fbots\u002Fchats\u002Fset-owner)\n- [Bot platform](\u002Fdocs\u002Fbots)\n- [Limits and optimization](\u002Fdocs\u002Foptimization)\n","2026-10-21",{},1794739445624]