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

Take task

POST /v1/tasks/:taskId/take

Takes on a task from a self-assignment flow: the key's user becomes the assignee, and the task moves to the In Progress status.

Parameters

Parameter Type Required Description
ParametertaskId (path) Typenumber Requiredyes DescriptionTask ID. List: GET /v1/tasks

Request fields (body)

Field Type Required Description
Fieldparams Typeobject Requiredno DescriptionAdditional action parameters. Passed to Bitrix24 unchanged

The request body can be empty or {}. Any field other than params is rejected with 400 INVALID_PARAMS.

Examples

curl — personal key

Terminal
curl -X POST 'https://vibecode.bitrix24.com/v1/tasks/289/take' \
  -H 'X-Api-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{}'

curl — OAuth application

Terminal
curl -X POST 'https://vibecode.bitrix24.com/v1/tasks/289/take' \
  -H 'X-Api-Key: YOUR_APP_KEY' \
  -H 'Authorization: Bearer USER_SESSION_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'

JavaScript — personal key

javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/tasks/289/take', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({}),
})
const result = await response.json()
console.log(result.data.task.status)

JavaScript — OAuth application

javascript
const response = await fetch('https://vibecode.bitrix24.com/v1/tasks/289/take', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({}),
})
const result = await response.json()
console.log(result.data.task.status)

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue on success
Fielddata.task Typeobject DescriptionThe full task object after the action. Values arrive in raw form: numbers as strings ("id": "289"), flags as Y or N ("taskControl": "N"). GET /v1/tasks/:id returns the same fields as numbers and true/false
Fielddata.task.id Typestring DescriptionTask ID
Fielddata.task.status Typestring DescriptionStatus after the action, here 3 — In Progress. Value meanings: GET /v1/tasks/fields → fields.status.enum
Fielddata.task.statusChangedDate Typestring DescriptionWhen the status changed, ISO 8601
Fielddata.task.responsibleId Typestring DescriptionAssignee ID after the call — the key's user
Fielddata.task.flowId Typestring DescriptionID of the flow the task was created in
Fielddata.task.action Typeobject DescriptionWhich actions the key's user can take after the call: the key is the action name (start, pause, complete, approve, disapprove, defer, renew, take and others), the value is true or false

Response example

Only the main fields of the task object are shown.

JSON
{
  "success": true,
  "data": {
    "task": {
      "id": "289",
      "title": "Prepare the quarterly report",
      "status": "3",
      "statusChangedDate": "2026-10-19T18:06:53+02:00",
      "createdBy": "42",
      "responsibleId": "1",
      "flowId": "19",
      "closedDate": null,
      "taskControl": "N",
      "action": {
        "start": false,
        "pause": true,
        "complete": true,
        "approve": false,
        "disapprove": false,
        "defer": false,
        "renew": false,
        "take": false
      }
    }
  }
}

Error response example

422 — the task cannot be taken:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "This task action is not allowed.",
    "b24Code": "0"
  }
}

The error.message text comes from Bitrix24. Branch on error.code, not on the message text.

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptiontaskId is not a positive integer: taskId must be a positive integer
HTTP400 CodeINVALID_PARAMS DescriptionThe request body is not a JSON object: body must be an object
HTTP400 CodeINVALID_PARAMS DescriptionThe body contains fields other than params: body contains unsupported fields
HTTP400 CodeINVALID_PARAMS Descriptionparams is not an object: params must be an object
HTTP401 CodeMISSING_API_KEY DescriptionX-Api-Key is missing
HTTP401 CodeINVALID_API_KEY DescriptionThe key is not found
HTTP401 CodeTOKEN_MISSING DescriptionThe key has no valid Bitrix24 token
HTTP403 CodeSCOPE_DENIED DescriptionThe key lacks the task or tasks scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionThe key's user has no rights to the task
HTTP422 CodeBITRIX_ERROR DescriptionThe task cannot be taken: it is not from a self-assignment flow, it has already been taken, or the key's user is already its assignee. Message: This task action is not allowed.
HTTP422 CodeBITRIX_ERROR DescriptionNo task exists with this taskId: Action unavailable

The full list of common API errors — Errors.

Known specifics

  • Only an unclaimed flow task can be taken. The task must come from a self-assignment flow and must not have been taken yet — the assignee is the same as the creator — and the key's user must be a member of the flow team. For a task outside a flow, a task that is already taken, or a task where the key's user is already the assignee, the call returns 422 BITRIX_ERROR with the message This task action is not allowed. For how flows work, see Flows and flow tasks.
  • Availability is visible in advance. The action map in the GET /v1/tasks/:id response shows take: true when the key's user can take the task right now. After the task is taken, the value becomes false.
  • A missing task does not return 404. An unknown taskId gets 422 BITRIX_ERROR with the message Action unavailable. To check whether the task exists, request it with GET /v1/tasks/:id: for a missing task it returns 404.

See also