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

Tasks

Manage Bitrix24 account tasks: create, read, update, delete, filter, aggregate. A task is a unit of work with a responsible person, a creator, a deadline, and a status. A single task may have comments and time-tracking records — these are separate nested resources.

Bitrix24 API: tasks.task.* Scope: tasks

Create task

POST /v1/tasks

Creates a new task. Requires at least a title and a responsible person.

Request fields (body)

Field Type Req. Description
title string Task title
responsibleId number Responsible person. Employee list: GET /v1/users
description string Task description. Supports BB-code ([USER=ID]Name[/USER], [B]...[/B], [QUOTE]...[/QUOTE])
priority number Priority: 0 — low, 1 — normal (default), 2 — high
status number Status. Defaults to 2 (pending). Full value list: GET /v1/tasks/fieldsfields.status.enum
deadline datetime Deadline (ISO 8601)
startDatePlan datetime Planned start date
endDatePlan datetime Planned end date
timeEstimate number Effort estimate in seconds
groupId number Workgroup. List: GET /v1/workgroups
parentId number Parent task. List: GET /v1/tasks
accomplices number[] Participants. Employee list: GET /v1/users
auditors number[] Observers. Employee list: GET /v1/users
tags string[] Task tags (array of name strings; accepted directly on create)
createdBy number Creator. Defaults to the key's user; an override is applied within the B24 user's permissions

Full field list — GET /v1/tasks/fields. The fields id, dateStart, createdDate, changedDate, closedDate, activityDate, changedBy, closedBy, statusChangedBy, realStatus are set by the system and are not passed in the body.

⚠️ A title longer than 250 characters is not rejected — Bitrix24 silently truncates it to 250. Emoji are replaced with a service sequence before the cut, so a title containing emoji is truncated earlier. Check title in the response when the exact title matters.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/tasks" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Prepare the quarterly report",
    "responsibleId": 1,
    "priority": 2,
    "deadline": "2026-05-19T18:00:00+00:00"
  }'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/tasks" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Prepare the quarterly report",
    "responsibleId": 1,
    "priority": 2,
    "deadline": "2026-05-19T18:00:00+00:00"
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Prepare the quarterly report',
    responsibleId: 1,
    priority: 2,
    deadline: '2026-05-19T18:00:00+00:00',
  }),
})

const { success, data } = await res.json()
console.log('New task ID:', data.id)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/tasks', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    title: 'Prepare the quarterly report',
    responsibleId: 1,
    priority: 2,
    deadline: '2026-05-19T18:00:00+00:00',
  }),
})

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

Response fields

Field Type Description
success boolean Always true on success
data object Full object of the created task (same as GET /v1/tasks/:id) — see Task fields

The task card URL in Bitrix24 is built from the id and the employee ID:

https://<portal>.bitrix24.com/company/personal/user/<responsibleId>/tasks/task/view/<id>/

<responsibleId> — the responsible person's ID (the responsibleId field in the response): the task opens in their personal workspace. The user/<...> segment defines whose workspace shows the tasks page — substitute the desired employee's ID, for example the current one. <portal> — the Bitrix24 account domain. Access is limited by the employee's permissions in Bitrix24.

Response example

JSON
{
  "success": true,
  "data": {
    "id": "3871",
    "title": "Prepare the quarterly report",
    "description": "",
    "status": "2",
    "priority": "2",
    "responsibleId": "1",
    "createdBy": "1",
    "createdDate": "2026-05-12T11:46:12+00:00",
    "deadline": "2026-05-19T18:00:00+00:00",
    "groupId": "0",
    "accomplices": [],
    "auditors": [],
    "creator": {
      "id": "1",
      "name": "Current user",
      "link": "/company/personal/user/1/"
    },
    "responsible": {
      "id": "1",
      "name": "Current user",
      "link": "/company/personal/user/1/"
    }
  }
}

Error response example

422 — responsible person not specified:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "Assignee not specified"
  }
}

Errors

HTTP Code Description
422 BITRIX_ERROR Bitrix24 rejected the task creation — for example, a required field title or responsibleId was not passed, or a submitted value was rejected by the portal
400 READONLY_FIELD A read-only field was passed in the request body (id, dateStart, createdDate, changedDate, closedDate, activityDate, changedBy, closedBy, statusChangedBy, realStatus)
403 SCOPE_DENIED The API key does not have the tasks scope
401 TOKEN_MISSING The API key has no configured tokens

The full list of common API errors — Errors.

See also