---
title: "Create a subtask"
method: POST
path: "/tasks/{taskId}/subtasks"
tags: ["Tasks"]
---

# Create a subtask

`POST /tasks/{taskId}/subtasks`

Creates a subtask for a specified task.

## Path parameters

- `taskId` string, uuid, required

## Request body

- SubTaskDto — Data transfer object for a subtask.
  - `staffId` string, required — Unique identifier of the associated staff member creating or updating the subtask.
  - `completedByStaffId` string, nullable — Unique identifier of the associated staff member who completed the subtask.
  - `subject` string, required — Subject of the subtask.
  - `isCompleted` boolean — True when the subtask is completed.
  - `completedDate` string, date-time, nullable — **Deprecated.** Use `CompletedDateOnly` instead. Completed date of the subtask 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 subtask. 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.

## Response `202`

When request is accepted. Returns a hypermedia 'Link' object of the subtask 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 subtask 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)
