---
title: Delete locale
slug: cms-13/api/k5Jj-delete-locale
docTags: 
createdAt: 2026-08-28T15:24:16.532Z
---

{
  "id": "9g6_jJfXlt6FeY8i4c6tg",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "/_cms/v1/content/{key}/locales/{locale}",
    "servers": [
      {
        "url": "/_cms/v1/content/{key}/locales/{locale}",
        "description": "Optimizely CMS API"
      }
    ],
    "name": "Delete locale",
    "description": "Deletes a branch of the content with the provided key and locale. Returns the published or latest content item in the locale that was deleted. If a content item with the provided key does not exist an error is returned.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "key",
          "type": "string",
          "description": "The key of the content item that should be deleted."
        },
        {
          "kind": "required",
          "name": "locale",
          "type": "string",
          "description": "The locale that should be deleted for the content item."
        }
      ],
      "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[]"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "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": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "headers": [
          {
            "kind": "optional",
            "name": "Preference-Applied",
            "description": ""
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Represents a version of a content item.",
            "customType": "ContentVersion",
            "schema": [
              {
                "name": "binding",
                "kind": "optional",
                "type": "object",
                "description": "<p>Associates a content item with another source content item, establishing a relationship defined by a content type binding. Used for linking managed content to external or reference content.</p>",
                "modelRef": "#/components/schemas/ContentBinding",
                "customType": "ContentBinding",
                "schema": [
                  {
                    "name": "contentTypeBinding",
                    "kind": "optional",
                    "type": "string",
                    "description": "The binding definition key that controls how the source content item is linked and accessed."
                  },
                  {
                    "name": "source",
                    "kind": "required",
                    "type": "string<uri>",
                    "description": "The reference to the source content item that is being bound. This cannot be empty.",
                    "format": "uri"
                  }
                ]
              },
              {
                "name": "properties",
                "kind": "optional",
                "type": "map",
                "description": "Properties as they are defined by corresponding component or content type.",
                "example": "",
                "customType": "map<string, PropertyData>",
                "schema": []
              },
              {
                "name": "key",
                "kind": "optional",
                "type": "string",
                "description": "The key that identifies this content version."
              },
              {
                "name": "locale",
                "kind": "optional",
                "type": "string",
                "description": "The locale of this content version."
              },
              {
                "name": "version",
                "kind": "optional",
                "type": "string",
                "readOnly": true,
                "description": "The version identifier of this instance."
              },
              {
                "name": "variation",
                "kind": "optional",
                "type": "string",
                "description": "<p>The variation of this content version, if any. Variations are used to represent different states or forms of the same content item. A variation has its own publishing lifecycle. A variation cannot be published before the default version of same locale has been published.</p>"
              },
              {
                "name": "contentType",
                "kind": "optional",
                "type": "string",
                "readOnly": true,
                "description": "The content type of this content item."
              },
              {
                "name": "displayName",
                "kind": "required",
                "type": "string",
                "description": "The display name of this content version.",
                "minLength": 1,
                "maxLength": 255
              },
              {
                "name": "published",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "Indicates a time when this content was published or should be published.",
                "format": "date-time"
              },
              {
                "name": "expired",
                "kind": "optional",
                "type": "string<date-time>",
                "nullable": true,
                "description": "Indicates a time when this content expired or should expire.",
                "format": "date-time"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string<draft | ready | published | previous | scheduled | rejected | inReview>",
                "readOnly": true,
                "description": "The status of this content version.",
                "enum": [
                  "draft",
                  "ready",
                  "published",
                  "previous",
                  "scheduled",
                  "rejected",
                  "inReview"
                ]
              },
              {
                "name": "delayPublishUntil",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "nullable": true,
                "description": "The timestamp when a scheduled version will be published. Only present when status is 'scheduled'.",
                "format": "date-time"
              },
              {
                "name": "routeSegment",
                "kind": "optional",
                "type": "string",
                "description": "<p>A string that represents the segment that should be used when routing or generating routes to the current content instance. This value will always be null when content is based on a non-routable content type.</p>",
                "maxLength": 255
              },
              {
                "name": "simpleRoute",
                "kind": "optional",
                "type": "string",
                "description": "<p>A simple route (shortcut URL) used to access pages and experiences.</p>",
                "maxLength": 253,
                "pattern": "^[^/].*$"
              },
              {
                "name": "lastModified",
                "kind": "optional",
                "type": "string<date-time>",
                "readOnly": true,
                "description": "",
                "format": "date-time"
              },
              {
                "name": "lastModifiedBy",
                "kind": "optional",
                "type": "string",
                "readOnly": true,
                "description": ""
              },
              {
                "name": "composition",
                "kind": "optional",
                "type": "object",
                "description": "Specifies a node in a content composition.",
                "modelRef": "#/components/schemas/CompositionNode",
                "customType": "CompositionNode",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "string",
                    "description": "Specifies an identifier of this CompositionNode."
                  },
                  {
                    "name": "displayName",
                    "kind": "optional",
                    "type": "string",
                    "description": "The display name of this ContentType.",
                    "maxLength": 255
                  },
                  {
                    "name": "nodeType",
                    "kind": "required",
                    "type": "string",
                    "description": "The node type of this CompositionNode.",
                    "minLength": 1
                  },
                  {
                    "name": "layoutType",
                    "kind": "optional",
                    "type": "string",
                    "description": "The node layout type of this CompositionNode"
                  },
                  {
                    "name": "displaySettings",
                    "kind": "optional",
                    "type": "object",
                    "description": "Defines display settings for a CompositionNode.",
                    "modelRef": "#/components/schemas/CompositionDisplaySettings",
                    "customType": "CompositionDisplaySettings",
                    "schema": [
                      {
                        "name": "displayTemplate",
                        "kind": "required",
                        "type": "string",
                        "description": "The display template that these settings apply to.",
                        "minLength": 1
                      },
                      {
                        "name": "settings",
                        "kind": "optional",
                        "type": "map",
                        "nullable": true,
                        "description": "The display settings of this CompositionNode.",
                        "example": "",
                        "customType": "map<string, string>",
                        "schema": []
                      }
                    ]
                  },
                  {
                    "name": "component",
                    "kind": "optional",
                    "type": "object",
                    "description": "Represents a content component.",
                    "modelRef": "#/components/schemas/ContentComponent",
                    "customType": "ContentComponent",
                    "schema": [],
                    "complexType": "allOf",
                    "complexItems": [
                      {
                        "name": "ContentData",
                        "description": "",
                        "modelRef": "#/components/schemas/ContentData",
                        "schema": [
                          {
                            "name": "binding",
                            "kind": "optional",
                            "type": "object",
                            "description": "<p>Associates a content item with another source content item, establishing a relationship defined by a content type binding. Used for linking managed content to external or reference content.</p>",
                            "modelRef": "#/components/schemas/ContentBinding",
                            "customType": "ContentBinding",
                            "schema": [
                              {
                                "name": "contentTypeBinding",
                                "kind": "optional",
                                "type": "string",
                                "description": "The binding definition key that controls how the source content item is linked and accessed."
                              },
                              {
                                "name": "source",
                                "kind": "required",
                                "type": "string<uri>",
                                "description": "The reference to the source content item that is being bound. This cannot be empty.",
                                "format": "uri"
                              }
                            ]
                          },
                          {
                            "name": "properties",
                            "kind": "optional",
                            "type": "map",
                            "description": "Properties as they are defined by corresponding component or content type.",
                            "example": "",
                            "customType": "map<string, PropertyData>",
                            "schema": []
                          }
                        ]
                      },
                      {
                        "name": "object",
                        "description": "",
                        "schema": [
                          {
                            "name": "reference",
                            "kind": "optional",
                            "type": "string<uri>",
                            "nullable": true,
                            "description": "A reference to the content of this component. Cannot be assigned together with 'contentType' or 'properties'.",
                            "format": "uri"
                          },
                          {
                            "name": "contentType",
                            "kind": "optional",
                            "type": "string",
                            "description": "The key of the content type that this is an embedded instance of."
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "nodes",
                    "kind": "optional",
                    "type": "array",
                    "nullable": true,
                    "description": "The child nodes for this CompositionNode.",
                    "modelRef": "#/components/schemas/CompositionNode",
                    "customType": "CompositionNode[]",
                    "schema": [
                      {
                        "name": "",
                        "description": "",
                        "customType": "Circular-Reference"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "media",
                "kind": "optional",
                "type": "object",
                "description": "Represents media data attached to a content item.",
                "modelRef": "#/components/schemas/MediaData",
                "customType": "MediaData",
                "schema": [
                  {
                    "name": "key",
                    "kind": "optional",
                    "type": "string",
                    "description": "The key referencing the media.",
                    "pattern": "^[a-f0-9]{32}\\.[a-zA-Z0-9]{1,20}$"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ContentVersion",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "binding",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Associates a content item with another source content item, establishing a relationship defined by a content type binding. Used for linking managed content to external or reference content.</p>",
                    "modelRef": "#/components/schemas/ContentBinding",
                    "customType": "ContentBinding",
                    "schema": [
                      {
                        "name": "contentTypeBinding",
                        "kind": "optional",
                        "type": "string",
                        "description": "The binding definition key that controls how the source content item is linked and accessed."
                      },
                      {
                        "name": "source",
                        "kind": "required",
                        "type": "string<uri>",
                        "description": "The reference to the source content item that is being bound. This cannot be empty.",
                        "format": "uri"
                      }
                    ]
                  },
                  {
                    "name": "properties",
                    "kind": "optional",
                    "type": "map",
                    "description": "Properties as they are defined by corresponding component or content type.",
                    "example": "",
                    "customType": "map<string, PropertyData>",
                    "schema": []
                  }
                ],
                "modelRef": "#/components/schemas/ContentData",
                "customType": "ContentData"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "key",
                    "kind": "optional",
                    "type": "string",
                    "description": "The key that identifies this content version."
                  },
                  {
                    "name": "locale",
                    "kind": "optional",
                    "type": "string",
                    "description": "The locale of this content version."
                  },
                  {
                    "name": "version",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The version identifier of this instance."
                  },
                  {
                    "name": "variation",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>The variation of this content version, if any. Variations are used to represent different states or forms of the same content item. A variation has its own publishing lifecycle. A variation cannot be published before the default version of same locale has been published.</p>"
                  },
                  {
                    "name": "contentType",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The content type of this content item."
                  },
                  {
                    "name": "displayName",
                    "kind": "required",
                    "type": "string",
                    "description": "The display name of this content version.",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  {
                    "name": "published",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "nullable": true,
                    "description": "Indicates a time when this content was published or should be published.",
                    "format": "date-time"
                  },
                  {
                    "name": "expired",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "nullable": true,
                    "description": "Indicates a time when this content expired or should expire.",
                    "format": "date-time"
                  },
                  {
                    "name": "status",
                    "kind": "optional",
                    "type": "string<draft | ready | published | previous | scheduled | rejected | inReview>",
                    "readOnly": true,
                    "description": "The status of this content version.",
                    "enum": [
                      "draft",
                      "ready",
                      "published",
                      "previous",
                      "scheduled",
                      "rejected",
                      "inReview"
                    ]
                  },
                  {
                    "name": "delayPublishUntil",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "nullable": true,
                    "description": "The timestamp when a scheduled version will be published. Only present when status is 'scheduled'.",
                    "format": "date-time"
                  },
                  {
                    "name": "routeSegment",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>A string that represents the segment that should be used when routing or generating routes to the current content instance. This value will always be null when content is based on a non-routable content type.</p>",
                    "maxLength": 255
                  },
                  {
                    "name": "simpleRoute",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>A simple route (shortcut URL) used to access pages and experiences.</p>",
                    "maxLength": 253,
                    "pattern": "^[^/].*$"
                  },
                  {
                    "name": "lastModified",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "",
                    "format": "date-time"
                  },
                  {
                    "name": "lastModifiedBy",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": ""
                  },
                  {
                    "name": "composition",
                    "kind": "optional",
                    "type": "object",
                    "description": "Specifies a node in a content composition.",
                    "modelRef": "#/components/schemas/CompositionNode",
                    "customType": "CompositionNode",
                    "schema": [
                      {
                        "name": "id",
                        "kind": "optional",
                        "type": "string",
                        "description": "Specifies an identifier of this CompositionNode."
                      },
                      {
                        "name": "displayName",
                        "kind": "optional",
                        "type": "string",
                        "description": "The display name of this ContentType.",
                        "maxLength": 255
                      },
                      {
                        "name": "nodeType",
                        "kind": "required",
                        "type": "string",
                        "description": "The node type of this CompositionNode.",
                        "minLength": 1
                      },
                      {
                        "name": "layoutType",
                        "kind": "optional",
                        "type": "string",
                        "description": "The node layout type of this CompositionNode"
                      },
                      {
                        "name": "displaySettings",
                        "kind": "optional",
                        "type": "object",
                        "description": "Defines display settings for a CompositionNode.",
                        "modelRef": "#/components/schemas/CompositionDisplaySettings",
                        "customType": "CompositionDisplaySettings",
                        "schema": [
                          {
                            "name": "displayTemplate",
                            "kind": "required",
                            "type": "string",
                            "description": "The display template that these settings apply to.",
                            "minLength": 1
                          },
                          {
                            "name": "settings",
                            "kind": "optional",
                            "type": "map",
                            "nullable": true,
                            "description": "The display settings of this CompositionNode.",
                            "example": "",
                            "customType": "map<string, string>",
                            "schema": []
                          }
                        ]
                      },
                      {
                        "name": "component",
                        "kind": "optional",
                        "type": "object",
                        "description": "Represents a content component.",
                        "modelRef": "#/components/schemas/ContentComponent",
                        "customType": "ContentComponent",
                        "schema": [],
                        "complexType": "allOf",
                        "complexItems": [
                          {
                            "name": "ContentData",
                            "description": "",
                            "modelRef": "#/components/schemas/ContentData",
                            "schema": [
                              {
                                "name": "binding",
                                "kind": "optional",
                                "type": "object",
                                "description": "<p>Associates a content item with another source content item, establishing a relationship defined by a content type binding. Used for linking managed content to external or reference content.</p>",
                                "modelRef": "#/components/schemas/ContentBinding",
                                "customType": "ContentBinding",
                                "schema": [
                                  {
                                    "name": "contentTypeBinding",
                                    "kind": "optional",
                                    "type": "string",
                                    "description": "The binding definition key that controls how the source content item is linked and accessed."
                                  },
                                  {
                                    "name": "source",
                                    "kind": "required",
                                    "type": "string<uri>",
                                    "description": "The reference to the source content item that is being bound. This cannot be empty.",
                                    "format": "uri"
                                  }
                                ]
                              },
                              {
                                "name": "properties",
                                "kind": "optional",
                                "type": "map",
                                "description": "Properties as they are defined by corresponding component or content type.",
                                "example": "",
                                "customType": "map<string, PropertyData>",
                                "schema": []
                              }
                            ]
                          },
                          {
                            "name": "object",
                            "description": "",
                            "schema": [
                              {
                                "name": "reference",
                                "kind": "optional",
                                "type": "string<uri>",
                                "nullable": true,
                                "description": "A reference to the content of this component. Cannot be assigned together with 'contentType' or 'properties'.",
                                "format": "uri"
                              },
                              {
                                "name": "contentType",
                                "kind": "optional",
                                "type": "string",
                                "description": "The key of the content type that this is an embedded instance of."
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "name": "nodes",
                        "kind": "optional",
                        "type": "array",
                        "nullable": true,
                        "description": "The child nodes for this CompositionNode.",
                        "modelRef": "#/components/schemas/CompositionNode",
                        "customType": "CompositionNode[]",
                        "schema": [
                          {
                            "name": "",
                            "description": "",
                            "customType": "Circular-Reference"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "media",
                    "kind": "optional",
                    "type": "object",
                    "description": "Represents media data attached to a content item.",
                    "modelRef": "#/components/schemas/MediaData",
                    "customType": "MediaData",
                    "schema": [
                      {
                        "name": "key",
                        "kind": "optional",
                        "type": "string",
                        "description": "The key referencing the media.",
                        "pattern": "^[a-f0-9]{32}\\.[a-zA-Z0-9]{1,20}$"
                      }
                    ]
                  }
                ]
              }
            ],
            "complexType": "allOf",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "204",
        "description": "No Content",
        "jsonExample": "",
        "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": "HaSjumFr2sQyiEFef3rjq",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url /_cms/v1/content/{key}/locales/{locale} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "hJDFff_cPFi1aermTbjJm",
          "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: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/_cms/v1/content/{key}/locales/{locale}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "4SK0nv-2NVGd53CVwno8z",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/_cms/v1/content/{key}/locales/{locale}\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "5wCm1XW3p_folU6bqbvhh",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/_cms/v1/content/{key}/locales/{locale}\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "HaSjumFr2sQyiEFef3rjq"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"binding\": {\n    \"contentTypeBinding\": \"\",\n    \"source\": \"\"\n  },\n  \"properties\": \"\",\n  \"key\": \"\",\n  \"locale\": \"\",\n  \"version\": \"\",\n  \"variation\": \"\",\n  \"contentType\": \"\",\n  \"displayName\": \"\",\n  \"published\": \"\",\n  \"expired\": \"\",\n  \"status\": \"\",\n  \"delayPublishUntil\": \"\",\n  \"routeSegment\": \"\",\n  \"simpleRoute\": \"\",\n  \"lastModified\": \"\",\n  \"lastModifiedBy\": \"\",\n  \"composition\": {\n    \"id\": \"\",\n    \"displayName\": \"\",\n    \"nodeType\": \"\",\n    \"layoutType\": \"\",\n    \"displaySettings\": {\n      \"displayTemplate\": \"\",\n      \"settings\": \"\"\n    },\n    \"component\": {},\n    \"nodes\": [\n      {\n        \"\": \"\"\n      }\n    ]\n  },\n  \"media\": {\n    \"key\": \"\"\n  }\n}"
        },
        {
          "id": "response-1-204",
          "language": "204",
          "code": "// No Content\n"
        },
        {
          "id": "response-2-400",
          "language": "400",
          "code": "// Bad Request\n"
        },
        {
          "id": "response-3-401",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "response-4-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-5-404",
          "language": "404",
          "code": "// Not Found\n"
        },
        {
          "id": "response-6-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}