# PATCH /api/v2/tasks/{task}

Update a task

- MCP id: tasks.update
- Scope: api:write:kanban
- Permission: kanban::manage_self
- Rate cost: 1 unit, write bucket. A write costs the same whatever `view` you ask for.
- Cache-Control: private, no-store

Partially updates a task: absent keys are untouched and an empty body is rejected.

A status change is a plain PATCH, not an action. Note that the response body can differ from the request body: `status` and `is_finished` are cross-synced on every write, so sending `is_finished`: `true` answers status: "finished", moving `status` off finished answers `is_finished`: `false`, and re-opening a finished task without naming a status answers status: "active". `status` wins when both are sent. `budget_id` is accepted at create time only, so a task cannot be re-budgeted or moved to another project here; `user_id`, `team_id` and `order_column` are not writable at all, which means a task cannot be reassigned to another employee through the API and there is no way to reorder a board. The write also bumps the owning project's `updated_at`, so the project's `ETag` changes and it reappears in an incremental `filter[updated_at][gte]` window, and it lands in that project's activity timeline rather than a timeline of its own. Send `If-Match` with the `ETag` from your last read to detect a concurrent edit, which answers `412`.

## Parameters
- task (integer, path): The Task's numeric id.
- view (string, optional): Which field set to render.
- X-Request-Id (header, optional): A correlation id of your own. It is recorded in our logs next to the server's request id but never returned: the response header always carries the server's id. A value that does not match the pattern is discarded silently, never rejected.
- If-Match (header, optional): The ETag a write is conditional on. A stale validator is 412 precondition-failed.

## Request body
- due_date (date (YYYY-MM-DD) or null, optional): Day the task is due. Required when creating a task through the API, and clearable afterwards; tasks created in plnnrly may carry `null`.
- minutes (integer ≥ 0, optional): Estimated effort, in minutes.
- description (string ≤ 255, optional): Short description shown on the kanban card. This is the task's label and the only field `?q=` searches.
- comment (string or null ≤ 255, optional): Optional longer comment on the card, capped at 255 characters.
- status (string, optional): Kanban column the card sits in.
- is_finished (boolean, optional): Whether the task is done. Cross-synced with `status` on every write: setting `status` to finished sets this `true` and any other status sets it `false`, while setting this `false` on a finished task moves `status` back to active. `status` wins when both are sent.
- is_billable (boolean, optional): Whether time logged on this task is billable. Defaults to `true` when a task is created through the API, regardless of the budget's own setting.

Unknown keys are refused with `422` validation-failed, naming the key.

## Response 200
- id (integer, required): Unique identifier.
- budget_id (integer, required): Budget the task is filed under. This is the task's only link to a project (a task has no `project_id` of its own), and it is settable at create time only; a task cannot be re-budgeted through the API.
- user_id (integer or null, required, server-assigned): The employee the task belongs to. Always the authenticated user on create; not writable. Null on a task left unassigned in plnnrly.
- team_id (integer or null, required, server-assigned): Team the task is filed under. Nothing on the API path assigns it, so a task created through the API always carries `null`; plnnrly itself is the only place a team is set. Not writable, and there is no `team` object beside it.
- due_date (date (YYYY-MM-DD) or null, required): Day the task is due. Required when creating a task through the API, and clearable afterwards; tasks created in plnnrly may carry `null`.
- minutes (integer, required): Estimated effort, in minutes.
- description (string ≤ 255, required): Short description shown on the kanban card. This is the task's label and the only field `?q=` searches.
- comment (string or null ≤ 255, required): Optional longer comment on the card, capped at 255 characters.
- is_finished (boolean, required): Whether the task is done. Cross-synced with `status` on every write: setting `status` to finished sets this `true` and any other status sets it `false`, while setting this `false` on a finished task moves `status` back to active. `status` wins when both are sent.
- is_billable (boolean, required): Whether time logged on this task is billable. Defaults to `true` when a task is created through the API, regardless of the budget's own setting.
- status (string, required): Kanban column the card sits in.
- order_column (integer, required, server-assigned): Position on the kanban board, lowest first. Appended to the end of the board on create and changed when someone drags the card in plnnrly. Not writable.
- created_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Creation timestamp.
- updated_at (timestamp (YYYY-MM-DDThh:mm:ssZ), required): Last-write timestamp; use for incremental sync.
- budget (Ref or BudgetSummary, required): The budget this task is filed under.
- user (Ref or UserSummary or null, required): The employee the task belongs to.
- links (TaskLinks, required)
  - self (url, required): The canonical URI of this record.

## Errors
- 403 forbidden-by-policy | insufficient-permission | insufficient-token-scope: Forbidden.
- 412 precondition-failed: Precondition failed.
- 415 unsupported-media-type: Unsupported media type.
- 422 unprocessable-relationship | validation-failed: Unprocessable content.
- 400 idempotency-key-required | invalid-cursor | invalid-query-parameter | malformed-request | unsupported-parameter: Bad request.
- 401 token-expired | unauthenticated: Unauthenticated.
- 404 endpoint-not-found | resource-not-found: Not found.
- 406 not-acceptable: Not acceptable.
- 429 rate-limit-exceeded: Too many requests.
- 500 internal-error: Server error.
- 503 tenant-unavailable: Service unavailable.

## Example
```bash
curl -X PATCH \
  'https://<your-url>/api/v2/tasks/1' \
  -H 'Authorization: Bearer <token>' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'If-Match: *' \
  -d '{
    "status": "finished"
  }'
```
