---
title: "Update a subtask"
method: PUT
path: "/tasks/{taskId}/subtasks/{id}"
tags: ["Tasks"]
---

# Update a subtask

`PUT /tasks/{taskId}/subtasks/{id}`

## Request

- Base URL: `https://api.smokeball.com`
- URL: `https://api.smokeball.com/tasks/{taskId}/subtasks/{id}`
- Auth: API key in header `x-api-key` and API key in header `Authorization`

Updates a specified subtask of a specified task.

## Path parameters

- `taskId` string, uuid, required
- `id` 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 updated.

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

## Other responses

- `400`: When an unsupported request is made.
- `403`: When subtask with specified id is not associated with authenticated client.
- `404`: When subtask with specified id does not exist.

---

[API](https://skmtc.dev/smokeball/apis/smokeball-api.md) - [All operations](https://skmtc.dev/smokeball/apis/smokeball-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smokeball/apis/smokeball-api/revisions/6e350cf667d4?raw)
