---
title: Copy content
slug: cms-13/api/copy-content
docTags: 
createdAt: 2026-08-28T15:24:16.532Z
---

{
  "id": "VFNkgOufb2BeSIajFfII5",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "/_cms/v1/content/{key}:copy",
    "servers": [
      {
        "url": "/_cms/v1/content/{key}:copy",
        "description": "Optimizely CMS API"
      }
    ],
    "name": "Copy content",
    "description": "Create a copy of the content item with the provided key.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "key",
          "type": "string",
          "description": "The key of the content item to copy."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "optional",
          "name": "Prefer",
          "type": "array",
          "example": "[\"return=representation\"]",
          "description": "<p>Indicates client preference for the response content as per IETF RFC7240. Currently only supports 'return=representation' which can be used to indicate a preference to receive a representation of the resource that has been altered in the response.</p>",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "kind": "optional",
          "name": "cms-accept-resource",
          "type": "array",
          "description": "<p>Indicates if the client accepts alternative response content in cases when the primary resource is unavailable. Empty and duplicated values are ignored. The order of values is ignored; When both are accepted, inherited resources take precedence over deleted resources. Unknown values are considered invalid.</p>",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "Optional instructions for how to copy content.",
          "customType": "CopyContentOptions",
          "schema": [
            {
              "name": "container",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Optional key of the container where the copied content should be placed."
            },
            {
              "name": "owner",
              "kind": "optional",
              "type": "string",
              "nullable": true,
              "description": "Optional key of the owner where the copied content should be placed."
            }
          ],
          "modelRef": "#/components/schemas/CopyContentOptions",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "apiAuth",
          "name": "apiAuth",
          "kind": "optional",
          "type": "oauth2",
          "description": "Use this scheme to generate an access token that can be used to access the API.",
          "oauth2Flows": {
            "clientCredentials": {
              "tokenUrl": "/_cms/v1/oauth/token",
              "scopes": {
                "api:admin": "Grants full administrative access to the API"
              }
            }
          },
          "requiredScopes": [
            "api:admin"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Created",
        "jsonExample": "",
        "isExpanded": true,
        "headers": [
          {
            "kind": "optional",
            "name": "Location",
            "type": "string",
            "description": "<p>Indicates the URL of the newly-created resource.</p>"
          },
          {
            "kind": "optional",
            "name": "Preference-Applied",
            "description": ""
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Metadata about a content item in the content hierarchy, including ownership, localization, and audit information. This represents the structural information without the actual property values.</p>",
            "customType": "ContentNode",
            "schema": [
              {
                "name": "key",
                "kind": "optional",
                "type": "string",
                "description": "<p>The unique identifier (key) of the resource.</p>"
              },
              {
                "name": "container",
                "kind": "optional",
                "type": "string",
                "description": "The content item that contains this item in the hierarchy."
              },
              {
                "name": "owner",
                "kind": "optional",
                "type": "string",
                "description": "The content item that owns this item. Content that is owned by another content is also known as an asset. Cannot be combined with container."
              },
              {
                "name": "contentType",
                "kind": "optional",
                "type": "string",
                "readOnly": true,
                "description": "The content type that defines the structure and available properties for this item."
              },
              {
                "name": "primaryLocale",
                "kind": "optional",
                "type": "string",
                "readOnly": true,
                "description": "The locale for which this content was originally created. This locale will include properties that are shared across all locales."
              },
              {
                "name": "locales",
                "kind": "optional",
                "type": "array",
                "readOnly": true,
                "description": "The complete list of locales for which this content has been created for.",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "lastModified",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "description": "The date and time when this content was last modified.",
                "format": "date-time"
              },
              {
                "name": "lastModifiedBy",
                "kind": "optional",
                "type": "string",
                "readOnly": true,
                "description": "The username of the user that last modified this content."
              },
              {
                "name": "created",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "description": "The date and time when this content was first created.",
                "format": "date-time"
              },
              {
                "name": "createdBy",
                "kind": "optional",
                "type": "string",
                "readOnly": true,
                "description": "The username of the user who created this content."
              },
              {
                "name": "deleted",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "nullable": true,
                "description": "<p>If populated, the date and time when this content was deleted.</p>",
                "format": "date-time"
              },
              {
                "name": "deletedBy",
                "kind": "optional",
                "type": "string",
                "readOnly": true,
                "description": "The username of the user who deleted this content. Only populated if the content is deleted."
              }
            ],
            "modelRef": "#/components/schemas/ContentNode",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad Request",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "Not Found",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "fIeSUZkmuQR0T51o9ntkl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url /_cms/v1/content/{key}:copy \\\n     --header 'accept: application/json'"
        },
        {
          "id": "55VyTziQEBQRKGu9_0mSE",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/_cms/v1/content/{key}:copy\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "9aDu_UPLKDySlYXEZTPAu",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/_cms/v1/content/{key}:copy\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "ZBtLObY5XGvRNdrtDMh6w",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/_cms/v1/content/{key}:copy\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "fIeSUZkmuQR0T51o9ntkl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "// Created\n{\n  \"key\": \"\",\n  \"container\": \"\",\n  \"owner\": \"\",\n  \"contentType\": \"\",\n  \"primaryLocale\": \"\",\n  \"locales\": [\n    \"\"\n  ],\n  \"lastModified\": \"\",\n  \"lastModifiedBy\": \"\",\n  \"created\": \"\",\n  \"createdBy\": \"\",\n  \"deleted\": \"\",\n  \"deletedBy\": \"\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad Request\n"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Not Found\n"
        },
        {
          "id": "response-5-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-201"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}