[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-automation\u002Fbizproc-tasks\u002Fdelegate":3,"docs-tabs-automation\u002Fbizproc-tasks\u002Fdelegate":6},{"content":4,"lastmod":5},"# Delegate tasks\n\n`POST \u002Fv1\u002Fbizproc-tasks\u002Fdelegate`\n\nBitrix24 checks whether you are allowed to delegate tasks. The method may delegate some tasks and then return an error for the rest. Re-read the task list before retrying; a refusal does not guarantee rollback of every change.\n\nBitrix24 API: `bizproc.task.delegate`\nScope: `bizproc`\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|---|---|---|---|\n| `taskIds` | integer[] | yes | Non-empty array of positive IDs from the [task list](\u002Fdocs\u002Fautomation\u002Fbizproc-tasks\u002Flist) |\n| `fromUserId` | integer | yes | Current assignee. Positive ID from the [employee list](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `toUserId` | integer | yes | New assignee. Positive ID from the [employee list](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbizproc-tasks\u002Fdelegate\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"taskIds\":[42],\"fromUserId\":1,\"toUserId\":2}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbizproc-tasks\u002Fdelegate\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"taskIds\":[42],\"fromUserId\":1,\"toUserId\":2}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst response = await fetch(\"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbizproc-tasks\u002Fdelegate\", {\n  method: \"POST\",\n  headers: { \"X-Api-Key\": \"YOUR_API_KEY\", \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({\"taskIds\":[42],\"fromUserId\":1,\"toUserId\":2})\n});\nconsole.log(await response.json());\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst response = await fetch(\"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbizproc-tasks\u002Fdelegate\", {\n  method: \"POST\",\n  headers: { \"X-Api-Key\": \"YOUR_APP_KEY\", \"Authorization\": \"Bearer USER_SESSION_TOKEN\", \"Content-Type\": \"application\u002Fjson\" },\n  body: JSON.stringify({\"taskIds\":[42],\"fromUserId\":1,\"toUserId\":2})\n});\nconsole.log(await response.json());\n```\n\n## Response fields\n\n| Field | Type | Description |\n|---|---|---|\n| `success` | boolean | `true` |\n| `data` | boolean | `true`, only if Bitrix24 returned `true` |\n\n## Response example\n\n```json\n{\"success\":true,\"data\":true}\n```\n\n## Error response example\n\n400 — `taskIds` is empty or contains values that are not positive integers:\n\n```json\n{\"success\":false,\"error\":{\"code\":\"INVALID_PARAMS\",\"message\":\"taskIds must be a non-empty array of positive safe integers\"}}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|---|---|---|\n| 400 | `INVALID_PARAMS` | `taskIds`, `fromUserId` or `toUserId` is missing, a value is not a positive integer, or the body contains other fields |\n| 401 | `TOKEN_MISSING` | No Bitrix24 credentials |\n| 403 | `SCOPE_DENIED` | Missing `bizproc` scope |\n| 403 | `BITRIX_ACCESS_DENIED` | Bitrix24 denies access |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | Key blocks writes |\n| 404 | `ENTITY_NOT_FOUND` | Task not found |\n| 422 | `BITRIX_ERROR` | Bitrix24 business refusal, for example no permission to delegate. The Bitrix24 code is in the `b24Code` field. The message is preserved with secrets removed |\n| 502 | `BITRIX_RESPONSE_INVALID` | Unexpected response shape or action result |\n\nCommon refusals and limits: [API errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Business-process tasks](\u002Fdocs\u002Fautomation\u002Fbizproc-tasks)\n- [List tasks](\u002Fdocs\u002Fautomation\u002Fbizproc-tasks\u002Flist)\n- [List employees](\u002Fdocs\u002Fentities\u002Fusers\u002Flist)\n- [Workflows](\u002Fdocs\u002Fautomation\u002Fworkflows)\n","2026-10-20",{},1795415347642]