#Create task

POST /v1/tasks

Creates a new task. The minimum is 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[] Collaborators. Employee list: GET /v1/users
auditors number[] Watchers. 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, createdDate, changedDate, closedDate are set by the system and are not passed in the body.

⚠️ title is limited to 250 characters — a longer title is rejected by the portal with the TASKS_BAD_TITLE error.

#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+03: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+03: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+03: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+03: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 portal 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+03:00",
    "deadline": "2026-05-19T18:00:00+03: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

400 — responsible person not specified:

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

#Errors

HTTP Code Description
400 BITRIX_ERROR A required field (title, responsibleId) was not passed, or a field contains an invalid value
400 READONLY_FIELD A read-only field was passed in the request body (id, createdDate, changedDate, closedDate)
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