---
title: "Update custom content"
method: PUT
path: "/custom-content/{id}"
tags: ["Custom Content"]
---

# Update custom content

`PUT /custom-content/{id}`

Update a custom content by id.
At most one of `spaceId`, `pageId`, `blogPostId`, or `customContentId` is allowed in the request body.
Note that if `spaceId` is specified, it must be the same as the `spaceId` used for creating the custom content
as moving custom content to a different space is not supported.

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

## Path parameters

- `id` integer, required

## Request body

- object
  - `id` string, required — Id of custom content.
  - `type` string, required — Type of custom content.
  - `status` 'current', required — The status of the custom content.
  - `spaceId` string — ID of the containing space (must be the same as the spaceId of the space the custom content was created in).
  - `pageId` string — ID of the containing page.
  - `blogPostId` string — ID of the containing Blog Post.
  - `customContentId` string — ID of the containing custom content.
  - `title` string, required — Title of the custom content.
  - `body` union, required
    - CustomContentBodyWrite
      - `representation` 'storage' | 'atlas_doc_format' | 'raw' — Type of content representation used for the value field.
      - `value` string — Body of the custom content, in the format found in the representation field.
    - CustomContentNestedBodyWrite — Body of the custom content. Only one body format should be specified as the property for this object, e.g. `storage`.
      - `storage` CustomContentBodyWrite
        - `representation` 'storage' | 'atlas_doc_format' | 'raw' — Type of content representation used for the value field.
        - `value` string — Body of the custom content, in the format found in the representation field.
      - `atlas_doc_format` CustomContentBodyWrite
        - `representation` 'storage' | 'atlas_doc_format' | 'raw' — Type of content representation used for the value field.
        - `value` string — Body of the custom content, in the format found in the representation field.
      - `raw` CustomContentBodyWrite
        - `representation` 'storage' | 'atlas_doc_format' | 'raw' — Type of content representation used for the value field.
        - `value` string — Body of the custom content, in the format found in the representation field.
  - `version` object, required
    - `number` integer — The version number, must be incremented by one.
    - `message` string — An optional message to be stored with the version.

## Response `200`

Returned if the requested custom content is updated successfully.

- object
  - `id` string — ID of the custom content.
  - `type` string — The type of custom content.
  - `status` 'current' | 'draft' | 'archived' | 'historical' | 'trashed' | 'deleted' | 'any' — The status of the content.
  - `title` string — Title of the custom content.
  - `spaceId` string — ID of the space the custom content is in. Note: This is always returned, regardless of if the custom content has a container that is a space.
  - `pageId` string — ID of the containing page. Note: This is only returned if the custom content has a container that is a page.
  - `blogPostId` string — ID of the containing blog post. Note: This is only returned if the custom content has a container that is a blog post.
  - `customContentId` string — ID of the containing custom content. Note: This is only returned if the custom content has a container that is custom content.
  - `authorId` string — The account ID of the user who created this custom content originally.
  - `createdAt` string, date-time — Date and time when the custom content 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.
  - `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.
  - `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.
  - `body` CustomContentBodySingle — Contains fields for each representation type requested.
    - `raw` 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.
    - `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.
  - `_links` object
    - `webui` 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 type of custom content is not found.

---

[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)
