# Update Tasks (/docs/api-reference/update_tasks)

`PATCH /v1/tasks` · operation `update_tasks`

Changes up to 1,000 Tasks in one call, each as update_task would: tasks holds task_id, expected_revision and the changes of each. All or nothing, in order, one receipt; one Idempotency-Key per call makes a retry safe. Returns count, task_ids and each new revision, in the order sent. A refused Task: details.task_index is its place in tasks (from 0). Agents on MCP send the same list to update_task.

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

### 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 |
| --- | --- | --- | --- |
| `tasks` | array of object | yes | 1 to 1,000 Tasks, changed in this order. |
| `tasks[].task_id` | string | yes | Stable Task ID. |
| `tasks[].expected_revision` | integer | yes |  |
| `tasks[].title` | string | no |  |
| `tasks[].description` | string or null | no |  |
| `tasks[].goal_id` | string or null | no |  |
| `tasks[].assignee_user_id` | string or null | no |  |
| `tasks[].assignee_email` | string (email) or null | no |  |
| `tasks[].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. |
| `tasks[].due_at` | string (date-time) or null | no |  |
| `tasks[].upload_folder_id` | string or null | no | Room tasks: folder for its uploads (null: none). |
| `tasks[].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. |
| `tasks[].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 | yes |  |
| `data.count` | integer | yes |  |
| `data.task_ids` | array of string | yes | The changed Tasks' IDs, in the order sent. |
| `data.revisions` | array of integer | yes | Each Task's new revision, in the same order. |
| `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" \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header "SMB-Workspace-Id: $WORKSPACE_ID" \
  --header "Idempotency-Key: $IDEMPOTENCY_KEY" \
  --header "Content-Type: application/json" \
  --data '{"tasks":[]}'
```