{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/atlassian/json-schema/atlassian-copy-page-request-schema.json",
  "title": "CopyPageRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/atlassian-content-children-and-descendants-api-openapi.yml#/components/schemas/CopyPageRequest",
  "required": [
    "destination"
  ],
  "type": "object",
  "properties": {
    "copyAttachments": {
      "type": "boolean",
      "description": "If set to `true`, attachments are copied to the destination page.",
      "default": false
    },
    "copyPermissions": {
      "type": "boolean",
      "description": "If set to `true`, page permissions are copied to the destination page.",
      "default": false
    },
    "copyProperties": {
      "type": "boolean",
      "description": "If set to `true`, content properties are copied to the destination page.",
      "default": false
    },
    "copyLabels": {
      "type": "boolean",
      "description": "If set to `true`, labels are copied to the destination page.",
      "default": false
    },
    "copyCustomContents": {
      "type": "boolean",
      "description": "If set to `true`, custom contents are copied to the destination page.",
      "default": false
    },
    "destination": {
      "$ref": "#/$defs/CopyPageRequestDestination"
    },
    "pageTitle": {
      "type": "string",
      "description": "If defined, this will replace the title of the destination page."
    },
    "body": {
      "type": "object",
      "properties": {
        "storage": {
          "$ref": "#/$defs/ContentBodyCreate"
        },
        "editor2": {
          "$ref": "#/$defs/ContentBodyCreate"
        }
      },
      "description": "If defined, this will replace the body of the destination page."
    }
  },
  "$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."
    },
    "CopyPageRequestDestination": {
      "required": [
        "type",
        "value"
      ],
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "space",
            "existing_page",
            "parent_page"
          ]
        },
        "value": {
          "type": "string",
          "description": "The space key for `space` type, and content id for `parent_page` and `existing_page`"
        }
      },
      "description": "Defines where the page will be copied to, and can be one of the following types.\n\n  - `parent_page`: page will be copied as a child of the specified parent page\n  - `space`: page will be copied to the specified space as a root page on the space\n  - `existing_page`: page will be copied and replace the specified page"
    }
  }
}