{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/atlassian/json-schema/atlassian-content-update-schema.json",
  "title": "ContentUpdate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/atlassian-content-api-openapi.yml#/components/schemas/ContentUpdate",
  "required": [
    "type",
    "version"
  ],
  "type": "object",
  "additionalProperties": true,
  "properties": {
    "version": {
      "required": [
        "number"
      ],
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": true,
      "properties": {
        "number": {
          "type": "integer",
          "description": "The version number.",
          "format": "int32"
        },
        "message": {
          "type": [
            "string",
            "null"
          ],
          "description": "An optional message to be stored with the corresponding version."
        }
      },
      "description": "The new version for the updated content. Set this to the current version number incremented by one, unless you are changing the status to 'draft' which must have a version number of 1.\n\nTo get the current version number, use [Get content by ID](#api-content-id-get) and retrieve `version.number`."
    },
    "title": {
      "maxLength": 255,
      "type": [
        "string",
        "null"
      ],
      "description": "The updated title of the content. If you are updating a non-draft `page` or `blogpost`, title is required. If you are not changing the title, set this field to the the current title."
    },
    "type": {
      "type": [
        "string",
        "null"
      ],
      "description": "The type of content. Set this to the current type of the content. For example, - page - blogpost - comment - attachment"
    },
    "status": {
      "type": "string",
      "description": "The updated status of the content. Note, if you change the status of a page from\n'current' to 'draft' and it has an existing draft, the existing draft will be deleted\nin favor of the updated page.",
      "enum": [
        "current",
        "trashed",
        "deleted",
        "historical",
        "draft"
      ]
    },
    "ancestors": {
      "type": [
        "array",
        "null"
      ],
      "description": "The new parent for the content. Only one parent content 'id' can be specified.",
      "items": {
        "required": [
          "id"
        ],
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "id": {
            "oneOf": [
              {
                "type": "integer"
              },
              {
                "type": "string"
              }
            ],
            "description": "The `id` of the parent content."
          }
        }
      }
    },
    "body": {
      "type": "object",
      "properties": {
        "view": {
          "$ref": "#/$defs/ContentBodyCreate"
        },
        "export_view": {
          "$ref": "#/$defs/ContentBodyCreate"
        },
        "styled_view": {
          "$ref": "#/$defs/ContentBodyCreate"
        },
        "storage": {
          "$ref": "#/$defs/ContentBodyCreateStorage"
        },
        "editor": {
          "$ref": "#/$defs/ContentBodyCreate"
        },
        "editor2": {
          "$ref": "#/$defs/ContentBodyCreate"
        },
        "wiki": {
          "$ref": "#/$defs/ContentBodyCreate"
        },
        "atlas_doc_format": {
          "$ref": "#/$defs/ContentBodyCreate"
        },
        "anonymous_export_view": {
          "$ref": "#/$defs/ContentBodyCreate"
        }
      },
      "description": "The updated body of the content. Does not apply to attachments.\nIf you are not sure how to generate these formats, you can create a page in the\nConfluence application, retrieve the content using [Get content](#api-content-get),\nand expand the desired content format, e.g. `expand=body.storage`."
    }
  },
  "$defs": {
    "ContentBodyCreate": {
      "required": [
        "representation",
        "value"
      ],
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "value": {
          "type": "string",
          "description": "The body of the content in the relevant format."
        },
        "representation": {
          "type": "string",
          "description": "The content format type. Set the value of this property to\nthe name of the format being used, e.g. 'storage'.",
          "enum": [
            "view",
            "export_view",
            "styled_view",
            "storage",
            "editor",
            "editor2",
            "anonymous_export_view",
            "wiki",
            "atlas_doc_format",
            "plain",
            "raw"
          ]
        }
      },
      "description": "This object is used when creating or updating content."
    },
    "ContentBodyCreateStorage": {
      "required": [
        "representation",
        "value"
      ],
      "type": "object",
      "additionalProperties": true,
      "properties": {
        "value": {
          "type": "string",
          "description": "The body of the content in the relevant format."
        },
        "representation": {
          "type": "string",
          "description": "The content format type. Set the value of this property to\nthe name of the format being used, e.g. 'storage'.",
          "enum": [
            "storage",
            "view",
            "export_view",
            "styled_view",
            "editor",
            "editor2",
            "anonymous_export_view",
            "wiki",
            "atlas_doc_format"
          ]
        }
      },
      "description": "This object is used when creating or updating content."
    }
  }
}