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

# Create a task

`POST /tasks`

## Request

- Base URL: `https://api.stoneproject.app/api/v1/public`
- URL: `https://api.stoneproject.app/api/v1/public/tasks`
- Auth: HTTP bearer

## Request body

- TaskInput
  - `title` string, required
  - `description` string, nullable
  - `project_id` string, uuid, nullable
  - `assigned_to` integer, nullable: Defaults to the company owner
  - `priority` 'low' | 'medium' | 'high' | 'urgent'
  - `due_date` string, date, nullable

## Response `201`

Created

- object
  - `success` boolean
  - `message` string, nullable
  - `data` Task
    - `id` string
    - `project_id` string, nullable
    - `assigned_to` integer, nullable
    - `title` string
    - `description` string, nullable
    - `priority` string
    - `status` string
    - `due_date` string, date, nullable
    - `completed_at` string, date-time, nullable
    - `created_at` string, date-time, nullable

## Other responses

- `401`: Missing, invalid, revoked or expired token
- `403`: The token lacks the required scope
- `422`: Invalid input
- `429`: Rate limit reached; retry after the Retry-After header

---

[API](https://skmtc.dev/stoneproject/apis/stone-project-public-api.md) · [All operations](https://skmtc.dev/stoneproject/apis/stone-project-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stoneproject/apis/stone-project-public-api/revisions/7cebff773929?raw)
