> ## 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.

# Toggle Subtask

> Toggle the completion state of a subtask.

## Path Parameters

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

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH http://localhost:3000/api/v1/tasks/subtasks/clsub001/toggle \
    -H "Authorization: Bearer <token>"
  ```
</RequestExample>

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