---
title: "Create Task"
method: POST
path: "/api/v1/tasks"
tags: ["Tasks"]
---

# Create Task

`POST /api/v1/tasks`

Create a new task.

## Request body

- Body37565102
  - `content` string, required — Task content.
  - `description` string, nullable — Task description.
  - `project_id` string, nullable — ID of the project to add the task to. If omitted or null, the task will be added to the user's Inbox.
  - `section_id` string, nullable — ID of the section to add the task to
  - `parent_id` string, nullable — ID of the parent task
  - `order` integer, nullable — Position of the task in the project or section
  - `labels` string[], nullable — List of label names.
  - `priority` integer, nullable — Task priority (1-4, where 1 is highest)
  - `assignee_id` integer, nullable — ID of the user to assign the task to. To find User IDs, use [Get user](#operation/user_info_api_v1_user_get) for your own ID or [Get all collaborators](#operation/get_project_collaborators_api_v1_projects__project_id__collaborators_get) for project members.
  - `due_string` string, nullable — Human-readable representation of the due date. See the [Due dates](#tag/Due-dates) section for more details.
  - `due_date` string, nullable — Due date in RFC 3339 format or similar. See the [Due dates](#tag/Due-dates) section for more details.
  - `due_datetime` string, nullable — Due date and time. See the [Due dates](#tag/Due-dates) section for more details.
  - `due_lang` string, nullable — Due date language code. See the [Due dates](#tag/Due-dates) section for more details.
  - `duration` integer, nullable — Task duration, in either minutes or days. Only used if `duration_unit` is also provided.
  - `duration_unit` 'minute' | 'day', nullable — Unit of time for duration.
  - `deadline_date` string, date, nullable — Deadline date in YYYY-MM-DD format

## Response `200`

Successful Response

- ItemSyncView — A class with fields representing an ItemView which will be returned to clients in a sync (or sync-like) response.
  - `user_id` string, required — String ID of the user who owns the task.
  - `id` string, required — String ID of the task.
  - `project_id` string, required — String ID of the project that contains the task.
  - `section_id` string, nullable, required — String ID of the section that contains the task, or `null` if the task is not in a section.
  - `parent_id` string, nullable, required — String ID of the parent task, or `null` if this is a top-level task.
  - `added_by_uid` string, nullable, required — String ID of the user who created the task, or `null` if unknown.
  - `assigned_by_uid` string, nullable, required — String ID of the user who assigned the task, or `null` if unassigned.
  - `responsible_uid` string, nullable, required — String ID of the user responsible for the task, or `null` if unassigned.
  - `labels` string[], required — Names of labels attached to the task.
  - `deadline` object, nullable, required — Deadline details for the task, or `null` when the task has no deadline.
  - `duration` object, nullable, required — Task duration details, or `null` when the task has no duration.
  - `is_collapsed` boolean, required — Whether the task is collapsed in the user's view.
  - `checked` boolean, required — Whether the task is completed.
  - `is_deleted` boolean, required — Whether the task is deleted.
  - `added_at` string, date-time, nullable, required — Date and time when the task was created, or `null` if unknown.
  - `completed_at` string, date-time, nullable, required — Date and time when the task was completed, or `null` if active.
  - `completed_by_uid` string, nullable, required — String ID of the user who completed the task, or `null` if active.
  - `updated_at` string, date-time, nullable, required — Date and time when the task was last updated, or `null` if unknown.
  - `due` object, nullable, required — Due date details for the task, or `null` when the task has no due date.
  - `priority` integer, required — Task priority from 1 (normal) to 4 (urgent).
  - `child_order` integer, required — Position of the task among sibling tasks.
  - `order_key` string, nullable, required — Fractional-indexing order key: tasks sort by comparing keys lexicographically among siblings sharing the same project, section and parent task. May be `null` for tasks not yet migrated.
  - `content` string, required — Task content.
  - `description` string, required — Task description.
  - `note_count` integer, required — **Deprecated**: only returns 0 and is marked for removal.
  - `day_order` integer, required — Task order for day-based views.
  - `completed_count` integer, required — Number of times the task has been marked as completed. Increments on every completion, including recurring occurrences and re-completions of a previously reopened task. Decremented when a recurring completion is undone.
  - `postponed_count` integer, required — Number of times the task's due date has been rescheduled by the user. Increments on any due-date change between two set dates (forward or backward); recurring completions and undos are not counted.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/todoist/apis/todoist-api.md) · [All operations](https://skmtc.net/todoist/apis/todoist-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/todoist/todoist-api/revisions/69a962f1578f/schema)
