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

# Create a task

`POST /tasks`

Creates a task.

## Request body

- TaskDto
  - `matterId` string, nullable — Unique identifier of the matter associated to the task.
  - `staffId` string, required — Unique identifier of the associated staff member creating or updating the task.
  - `completedByStaffId` string, nullable — Unique identifier of the associated staff member completing the task.
  - `assigneeIds` string[], nullable — Unique identifier(s) of the associated staff member(s) assigned to the task.
  - `subject` string, nullable — The subject - this should be a short description of the task.
  - `note` string, nullable — Notes on the task.
  - `isCompleted` boolean — True when the task is completed.
  - `categories` string[], nullable — Categories for the task.
  - `completedDate` string, date-time, nullable — **Deprecated.** Use `CompletedDateOnly` instead. Completed date of the task in UTC. If not provided and IsCompleted is set to true, the current date will be used.
  - `completedDateOnly` string, date-time, nullable — Completed date of the task. Takes precendence over CompletedDate if set. If not provided and IsCompleted is set to true, the current date will be used. Any time/timezone information will be discarded and only the date portion will be considered.
  - `dueDate` string, date-time, nullable — **Deprecated.** Use `DueDateOnly` instead. Due date of the task in UTC.
  - `dueDateOnly` string, date-time, nullable — Due date of the task. Takes precendence over DueDate if set. Any time/timezone information will be discarded and only the date portion will be considered.
  - `duration` string, nullable — Duration of the task in ISO 8601 duration format.

## Response `202`

When request is accepted. Returns a hypermedia 'Link' object of the task to be created.

- Link
  - `id` string, nullable
  - `href` string, nullable
  - `relation` string, nullable
  - `method` string, nullable

## Other responses

- `400` — When an unsupported request is made.
- `403` — When a task cannot be created for the authenticated client.

---

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