# Update Task (/docs/api-reference/update_task)

`PATCH /v1/tasks/{task_id}` · operation `update_task`

Change a Task: its status (recommended, not_started, in_progress, done, archived), an optional archive_reason, title, description, goal, assignee (user ID or a teammate's email) or due date. Anyone who can change a Task can set any status, including back from done or archived. To change many: over HTTP, PATCH /v1/tasks (Update Tasks); on MCP, send tasks (1 to 1,000, each with task_id, expected_revision and the changes) to this tool instead of task_id: all or nothing, in order, one receipt; returns count, task_ids and each new revision. A refused Task: details.task_index (from 0).

**Sign-in:** a signed-in person's access token (`Authorization: Bearer …`), which AI apps get through MCP sign-in; or a Workspace API key in the `X-SMB-API-Key` header.

### Path parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `task_id` | string | yes | Stable Task ID. |

### Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `SMB-Workspace-Id` | string (uuid) | yes | Workspace where this operation runs. Required for user tokens and Workspace API keys. |
| `Idempotency-Key` | string | yes |  |

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `expected_revision` | integer | yes |  |
| `title` | string | no |  |
| `description` | string or null | no |  |
| `goal_id` | string or null | no |  |
| `assignee_user_id` | string or null | no |  |
| `assignee_email` | string (email) or null | no |  |
| `assignee_rule` | one of `link_opener`, `null` | no | Room tasks: link_opener = whoever opens a link that starts from this Room. Not with an assignee. |
| `due_at` | string (date-time) or null | no |  |
| `upload_folder_id` | string or null | no | Room tasks: folder for its uploads (null: none). |
| `status` | one of `recommended`, `not_started`, `in_progress`, `done`, `archived` | no | recommended (suggested to someone), not_started, in_progress, done or archived. Anyone who can change the task can move it to any status. |
| `archive_reason` | string or null | no | Optional note on why it is archived. Cleared when the Task leaves archived. |

### Response

**200** Successful authorized response.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object or object | yes |  |
| `receipt` | object | yes |  |
| `receipt.receipt_id` | string (uuid) | yes |  |
| `receipt.command_id` | string (uuid) | yes |  |
| `receipt.operation` | string | yes |  |
| `receipt.workspace_id` | string (uuid) | yes |  |
| `idempotent_replay` | boolean | yes |  |
| `request_id` | string | yes |  |

### Errors

- `400` The request is invalid.
- `401` Authentication is required.
- `403` The caller is not authorized.
- `404` The resource was not found.
- `409` The resource revision or idempotency input conflicts.
- `413` The request body is too large.
- `415` The request must be JSON.
- `422` Required evidence is missing.
- `429` Rate limit reached; honor Retry-After.
- `500` The request could not be completed.
- `502` A dependency returned an invalid response.
- `503` The service is temporarily unavailable.

### Example

```bash
curl --request PATCH "https://api.smb.co/v1/tasks/$TASK_ID" \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header "SMB-Workspace-Id: $WORKSPACE_ID" \
  --header "Idempotency-Key: $IDEMPOTENCY_KEY" \
  --header "Content-Type: application/json" \
  --data '{"expected_revision":1}'
```