---
title: "Update a task"
method: PUT
path: "/api/tasks/{taskId}"
tags: ["Tasks"]
---

# Update a task

`PUT /api/tasks/{taskId}`

## Request

- Base URL: `https://core-api.getaptly.com`
- URL: `https://core-api.getaptly.com/api/tasks/{taskId}`
- Auth: one of:
  - API key in header `x-token`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/getaptly/apis/aptly-api/docs/api/tasks/:taskId/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates a task and keeps its card-checklist mirror entry in sync.

The update is attributed to a user who must belong to the company. With a
delegate token the user is taken from the token. With an API key (no
associated user), supply `userId` in the body — it must belong to the
company or the request is rejected.

## Path parameters

- `taskId` string, required

## Request body

- object
  - `userId` string: Acting user the update is attributed to. Required with API-key auth (must belong to the company); ignored with a delegate token, which supplies the user itself.
  - `title` string
  - `description` string
  - `checked` boolean
  - `dueAt` string, date-time
  - `status` string: One of backlog|notStarted|inProgress|onHold|completed.
  - `priority` string: One of asap|high|medium|low.
  - `assigneeId` string
  - `archived` boolean
  - `archivedAt` string, date-time
  - `startedAt` string, date-time
  - `checkedAt` string, date-time
  - `pinned` boolean
  - `rank` number
  - `attachmentIds` string[]
  - `outcomeType` string
  - `aptletInstanceId` string
  - `fieldId` string

## Response `200`

Task updated.

- object
  - `ok` boolean

## Other responses

- `400`: Missing or invalid field.
- `401`: Invalid or missing credential.
- `404`: Task not found.

---

[API](https://skmtc.dev/getaptly/apis/aptly-api.md) - [All operations](https://skmtc.dev/getaptly/apis/aptly-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaptly/apis/aptly-api/revisions/75c367e0b8e5?raw)
