---
title: "Update task"
method: PUT
path: "/tasks/{id}"
tags: ["Task"]
---

# Update task

`PUT /tasks/{id}`

Update a task by id. This endpoint currently only supports updating task status.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to edit the containing page or blog post and view its corresponding space.

## Path parameters

- `id` integer, required

## Query parameters

- `body-format` 'storage' | 'atlas_doc_format' — The primary formats a body can be represented as. A subset of BodyRepresentation. These formats are the only allowed formats in certain use cases.

## Request body

- object
  - `id` string — ID of the task.
  - `localId` string — Local ID of the task. This ID is local to the corresponding page or blog post.
  - `spaceId` string — ID of the space the task is in.
  - `pageId` string — ID of the page the task is in.
  - `blogPostId` string — ID of the blog post the task is in.
  - `status` 'complete' | 'incomplete', required — Status of the task.
  - `createdBy` string — Account ID of the user who created this task.
  - `assignedTo` string — Account ID of the user to whom this task is assigned.
  - `completedBy` string — Account ID of the user who completed this task.
  - `createdAt` string, date-time — Date and time when the task was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
  - `updatedAt` string, date-time — Date and time when the task was updated. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
  - `dueAt` string, date-time — Date and time when the task is due. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
  - `completedAt` string, date-time — Date and time when the task was completed. In format "YYYY-MM-DDTHH:mm:ss.sssZ".

## Response `200`

Returned if the requested task is updated.

- Task
  - `id` string — ID of the task.
  - `localId` string — Local ID of the task. This ID is local to the corresponding page or blog post.
  - `spaceId` string — ID of the space the task is in.
  - `pageId` string — ID of the page the task is in.
  - `blogPostId` string — ID of the blog post the task is in.
  - `status` 'complete' | 'incomplete' — Status of the task.
  - `body` TaskBodySingle — Contains fields for each representation type requested.
    - `storage` BodyType
      - `representation` string — Type of content representation used for the value field.
      - `value` string — Body of the content, in the format found in the representation field.
    - `atlas_doc_format` BodyType
      - `representation` string — Type of content representation used for the value field.
      - `value` string — Body of the content, in the format found in the representation field.
  - `createdBy` string — Account ID of the user who created this task.
  - `assignedTo` string — Account ID of the user to whom this task is assigned.
  - `completedBy` string — Account ID of the user who completed this task.
  - `createdAt` string, date-time — Date and time when the task was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
  - `updatedAt` string, date-time — Date and time when the task was updated. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
  - `dueAt` string, date-time — Date and time when the task is due. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
  - `completedAt` string, date-time — Date and time when the task was completed. In format "YYYY-MM-DDTHH:mm:ss.sssZ".

## Other responses

- `400` — Returned if an invalid request is provided.
- `401` — Returned if the authentication credentials are incorrect or missing from the request.
- `404` — Returned if: - The provided task does not exist - The user does not have permissions to view the task - The user does not have the needed permissions to update the containing page or blog post in the corresponding space

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api-v2/versions/c4bd1ed570f2/schema)
