> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nexusmission.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Subtask

> Add a subtask to an existing task.

## Path Parameters

<ParamField path="id" type="string" required>
  Parent task ID.
</ParamField>

## Body

<ParamField body="title" type="string" required>
  Subtask title.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST http://localhost:3000/api/v1/tasks/clxyz789/subtasks \
    -H "Authorization: Bearer <token>" \
    -H "Content-Type: application/json" \
    -d '{"title": "Write unit tests"}'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "clsub001",
    "title": "Write unit tests",
    "completed": false,
    "taskId": "clxyz789"
  }
  ```
</ResponseExample>
