For AI agents: markdown of this page — /docs-content-en/automation/bizproc-tasks/delegate.md documentation index — /llms.txt

Delegate tasks

POST /v1/bizproc-tasks/delegate

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

Bitrix24 API: bizproc.task.delegate Scope: bizproc

Request fields (body)

Field Type Required Description
FieldtaskIds Typeinteger[] Requiredyes DescriptionNon-empty array of positive IDs from the task list
FieldfromUserId Typeinteger Requiredyes DescriptionCurrent assignee. Positive ID from the employee list
FieldtoUserId Typeinteger Requiredyes DescriptionNew assignee. Positive ID from the employee list

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/bizproc-tasks/delegate" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"taskIds":[42],"fromUserId":1,"toUserId":2}'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/bizproc-tasks/delegate" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"taskIds":[42],"fromUserId":1,"toUserId":2}'

JavaScript — personal key

javascript
const response = await fetch("https://vibecode.bitrix24.com/v1/bizproc-tasks/delegate", {
  method: "POST",
  headers: { "X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json" },
  body: JSON.stringify({"taskIds":[42],"fromUserId":1,"toUserId":2})
});
console.log(await response.json());

JavaScript — OAuth application

javascript
const response = await fetch("https://vibecode.bitrix24.com/v1/bizproc-tasks/delegate", {
  method: "POST",
  headers: { "X-Api-Key": "YOUR_APP_KEY", "Authorization": "Bearer USER_SESSION_TOKEN", "Content-Type": "application/json" },
  body: JSON.stringify({"taskIds":[42],"fromUserId":1,"toUserId":2})
});
console.log(await response.json());

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue
Fielddata Typeboolean Descriptiontrue, only if Bitrix24 returned true

Response example

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

Error response example

400 — taskIds is empty or contains values that are not positive integers:

JSON
{"success":false,"error":{"code":"INVALID_PARAMS","message":"taskIds must be a non-empty array of positive safe integers"}}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptiontaskIds, fromUserId or toUserId is missing, a value is not a positive integer, or the body contains other fields
HTTP401 CodeTOKEN_MISSING DescriptionNo Bitrix24 credentials
HTTP403 CodeSCOPE_DENIED DescriptionMissing bizproc scope
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionBitrix24 denies access
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionKey blocks writes
HTTP404 CodeENTITY_NOT_FOUND DescriptionTask not found
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 business refusal, for example no permission to delegate. The Bitrix24 code is in the b24Code field. The message is preserved with secrets removed
HTTP502 CodeBITRIX_RESPONSE_INVALID DescriptionUnexpected response shape or action result

Common refusals and limits: API errors.

See also