---
title: "Update page"
method: PUT
path: "/pages/{id}"
tags: ["Page"]
---

# Update page

`PUT /pages/{id}`

Update a page by id.

When the "current" version is updated, the provided body content is considered as the latest version. This latest body content
will be attempted to be merged into the draft version through a content reconciliation algorithm. If two versions are significantly diverged, 
the latest provided content may entirely override what was previously in the draft. 

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
Permission to view the page and its corresponding space. Permission to update pages in the space.

## Path parameters

- `id` integer, required

## Request body

- object
  - `id` string, required — Id of the page.
  - `status` 'current' | 'draft', required — The updated status of the page. Note, if you change the status of a page from 'current' to 'draft' and it has an existing draft, the existing draft will be deleted in favor of the updated draft. Additionally, this endpoint can be used to restore a 'trashed' or 'deleted' page to 'current' status. For restoration, page contents will not be updated and only the page status will be changed.
  - `title` string, required — Title of the page.
  - `spaceId` unknown
  - `parentId` unknown
  - `ownerId` unknown
  - `body` union, required
    - PageBodyWrite
      - `representation` 'storage' | 'atlas_doc_format' | 'wiki' — Type of content representation used for the value field.
      - `value` string — Body of the page, in the format found in the representation field.
    - PageNestedBodyWrite — Body of the page. Only one body format should be specified as the property for this object, e.g. `storage`.
      - `storage` PageBodyWrite
        - `representation` 'storage' | 'atlas_doc_format' | 'wiki' — Type of content representation used for the value field.
        - `value` string — Body of the page, in the format found in the representation field.
      - `atlas_doc_format` PageBodyWrite
        - `representation` 'storage' | 'atlas_doc_format' | 'wiki' — Type of content representation used for the value field.
        - `value` string — Body of the page, in the format found in the representation field.
      - `wiki` PageBodyWrite
        - `representation` 'storage' | 'atlas_doc_format' | 'wiki' — Type of content representation used for the value field.
        - `value` string — Body of the page, in the format found in the representation field.
  - `version` object, required
    - `number` integer — The new version of the updated page. Set this to the current version number plus one, unless you are updating the status to 'draft' which requires a version number of 1. If you don't know the current version number, use Get page by id.
    - `message` string — An optional message to be stored with the version.

## Response `200`

Returned if the requested page is successfully updated.

- object
  - `id` string — ID of the page.
  - `status` 'current' | 'draft' | 'archived' | 'historical' | 'trashed' | 'deleted' | 'any' — The status of the content.
  - `title` string — Title of the page.
  - `spaceId` string — ID of the space the page is in.
  - `parentId` string — ID of the parent page, or null if there is no parent page.
  - `parentType` 'page' | 'whiteboard' | 'database' | 'embed' | 'folder' — Content type of the parent, or null if there is no parent.
  - `position` integer, nullable — Position of child page within the given parent page tree.
  - `authorId` string — The account ID of the user who created this page originally.
  - `ownerId` string, nullable — The account ID of the user who owns this page.
  - `lastOwnerId` string, nullable — The account ID of the user who owned this page previously, or null if there is no previous owner.
  - `createdAt` string, date-time — Date and time when the page was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
  - `version` Version
    - `createdAt` string, date-time — Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
    - `message` string — Message associated with the current version.
    - `number` integer — The version number.
    - `minorEdit` boolean — Describes if this version is a minor version. Email notifications and activity stream updates are not created for minor versions.
    - `authorId` string — The account ID of the user who created this version.
  - `body` BodySingle — 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.
    - `view` 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.
  - `labels` object
    - `results` Label[]
      - `id` string — ID of the label.
      - `name` string — Name of the label.
      - `prefix` string — Prefix of the label.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `properties` object
    - `results` ContentProperty[]
      - `id` string — ID of the property
      - `key` string — Key of the property
      - `value` unknown
      - `version` Version
        - `createdAt` string, date-time — Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
        - `message` string — Message associated with the current version.
        - `number` integer — The version number.
        - `minorEdit` boolean — Describes if this version is a minor version. Email notifications and activity stream updates are not created for minor versions.
        - `authorId` string — The account ID of the user who created this version.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `operations` object
    - `results` Operation[]
      - `operation` string — The type of operation.
      - `targetType` string — The type of entity the operation type targets.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `likes` object
    - `results` Like[]
      - `accountId` string — Account ID.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `versions` object
    - `results` Version[]
      - `createdAt` string, date-time — Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ".
      - `message` string — Message associated with the current version.
      - `number` integer — The version number.
      - `minorEdit` boolean — Describes if this version is a minor version. Email notifications and activity stream updates are not created for minor versions.
      - `authorId` string — The account ID of the user who created this version.
    - `meta` OptionalFieldMeta
      - `hasMore` boolean — Indicates if there are more available results that can be fetched.
      - `cursor` string — A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the next set of results.
    - `_links` OptionalFieldLinks
      - `self` string — A relative URL that can be used to fetch results beyond what this include parameter retrieves.
  - `isFavoritedByCurrentUser` boolean — Whether the page has been favorited by the current user.
  - `_links` object
    - `webui` string — Web UI link of the content.
    - `editui` string — Edit UI link of the content.
    - `tinyui` string — Web UI link of the content.
    - `base` string — Base url of the Confluence site.

## 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 page does not exist - The user does not have permissions to view the page - The user does not have the needed permissions to update a page in the space - The user provides a parentId for a page that does not exist or they do not have permission to view - There are no spaces associated with the given spaceId

---

[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/revisions/c4bd1ed570f2/schema)
