---
title: "Create a new task"
method: POST
path: "/tasks"
tags: ["Tasks"]
---

# Create a new task

`POST /tasks`

Create a new task with the specified properties

## Request body

- TaskCreateRequest
  - `name` string, required — Task name
  - `description` string, nullable — Task description (HTML allowed)
  - `project_id` string, uuid, required — Project UUID this task belongs to
  - `status_id` string, uuid, nullable — Initial status UUID (defaults to project's default status)
  - `priority_id` string, uuid, nullable — Priority UUID
  - `assignees` string[] — Array of user UUIDs to assign
  - `labels` string[] — Array of label names (will be created if they don't exist)
  - `start_date` string, date, nullable
  - `end_date` string, date, nullable
  - `total_hours` number — Estimated hours
  - `total_minutes` number — Estimated minutes (combined with total_hours)
  - `billable` boolean

## Response `200`

Task created successfully

- object
  - `done` boolean, required — Indicates if the operation was successful
  - `body` object, nullable, required — Response data (type varies by endpoint, null if no data)
    - `id` string, uuid — Task UUID
    - `name` string — Task name
    - `description` string, nullable — Task description (supports HTML)
    - `project_id` string, uuid — Associated project UUID
    - `status_id` string, uuid — Task status UUID
    - `priority_id` string, uuid, nullable — Task priority UUID
    - `assignees` string[] — Array of assigned user UUIDs
    - `labels` object[] — Task labels with colors
      - `name` string
      - `color` string
    - `start_date` string, date, nullable — Task start date (YYYY-MM-DD)
    - `end_date` string, date, nullable — Task due date (YYYY-MM-DD)
    - `total_minutes` integer — Estimated time in minutes
    - `billable` boolean — Whether the task is billable
    - `created_at` string, date-time — Task creation timestamp
    - `updated_at` string, date-time — Last update timestamp
  - `title` string, nullable — Optional response title
  - `message` string, nullable — Optional message (error message or success notification)

## Other responses

- `400` — Request validation failed
- `401` — Authentication required
- `403` — CSRF token validation failed

---

[API](https://skmtc.dev/worklenz/apis/worklenz-api.md) · [All operations](https://skmtc.dev/worklenz/apis/worklenz-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/worklenz/worklenz-api/revisions/e44341b9118c/schema)
