---
title: List locales
slug: cms-13/api/list-locales
docTags: 
createdAt: 2026-08-28T15:24:16.532Z
---

{
  "id": "mKmNswQZx5Cu2fLI-2X2m",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "/_cms/v1/locales",
    "servers": [
      {
        "url": "/_cms/v1/locales",
        "description": "Optimizely CMS API"
      }
    ],
    "name": "List locales",
    "description": "<p>List all locales (language branches) available in the CMS.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "pageIndex",
          "type": "integer<int32>",
          "description": "Zero based index of the page that should be retrieved.",
          "format": "int32",
          "minimum": 0,
          "maximum": 10000
        },
        {
          "kind": "optional",
          "name": "pageSize",
          "type": "integer<int32>",
          "description": "The maximum items per page that should be retrieved.",
          "format": "int32",
          "minimum": 1,
          "maximum": 10000
        }
      ],
      "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,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "<p>Represents a single page of items in a paged collection, including paging metadata such as the current page index, page size, and an estimated total item count.</p>",
            "customType": "LocalePage",
            "schema": [
              {
                "name": "items",
                "kind": "optional",
                "type": "array",
                "readOnly": true,
                "description": "The items in this paged collection.",
                "modelRef": "#/components/schemas/Locale",
                "customType": "Locale[]",
                "schema": [
                  {
                    "name": "key",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>The unique identifier (key) of the resource. This is the IETF BCP-47 language tag (e.g., \"en\", \"en-US\", \"sv-SE\").</p>",
                    "minLength": 1
                  },
                  {
                    "name": "displayName",
                    "kind": "required",
                    "type": "string",
                    "description": "The display name of this locale.",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  {
                    "name": "isEnabled",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Indicates whether this locale is enabled and can be used to create content."
                  },
                  {
                    "name": "routeSegment",
                    "kind": "required",
                    "type": "string",
                    "description": "A string that represents the segment that should be used when routing or generate routes to the current locale",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  {
                    "name": "sortOrder",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "A value that is used when sorting locales.",
                    "format": "int32"
                  },
                  {
                    "name": "accessRights",
                    "kind": "optional",
                    "type": "array",
                    "nullable": true,
                    "description": "<p>The access rights assigned to this locale that defines who can create content in this locale. If no access rights are assigned, everyone will be able to create content in this locale. An empty array means that no user will be allowed to create or change content in this locale.</p>",
                    "modelRef": "#/components/schemas/SecurityIdentity",
                    "customType": "SecurityIdentity[]",
                    "schema": [
                      {
                        "name": "name",
                        "kind": "required",
                        "type": "string",
                        "description": "<p>The unique name of the user, role or application that this identifier references.</p>",
                        "minLength": 1,
                        "maxLength": 255
                      },
                      {
                        "name": "type",
                        "kind": "optional",
                        "type": "string<user | role | application>",
                        "description": "The type of the security entity that this identifier references. Will default to 'role' if not specified.",
                        "enum": [
                          "user",
                          "role",
                          "application"
                        ]
                      }
                    ]
                  },
                  {
                    "name": "created",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "A timestamp indicating when this locale was first created.",
                    "format": "date-time"
                  },
                  {
                    "name": "createdBy",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The username of the user that created this locale."
                  },
                  {
                    "name": "lastModified",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "",
                    "format": "date-time"
                  },
                  {
                    "name": "lastModifiedBy",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The username of the user that last modified this locale."
                  }
                ]
              },
              {
                "name": "pageIndex",
                "kind": "optional",
                "type": "integer<int32>",
                "readOnly": true,
                "description": "<p>The zero-based index of the current page.</p>",
                "format": "int32"
              },
              {
                "name": "pageSize",
                "kind": "optional",
                "type": "integer<int32>",
                "readOnly": true,
                "description": "The number of items in each page. Not necessarily the same as the number of items in this page.",
                "format": "int32"
              },
              {
                "name": "totalCount",
                "kind": "optional",
                "type": "integer<int32>",
                "readOnly": true,
                "nullable": true,
                "description": "The estimated total number of items in the collection. May be omitted if the total count is unknown.",
                "format": "int32"
              }
            ],
            "modelRef": "#/components/schemas/LocalePage",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "acBwY91vK3FrVI7dWXTVu",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url /_cms/v1/locales \\\n     --header 'accept: application/json'"
        },
        {
          "id": "u3RjZmoIOnjes_OA4ynh2",
          "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: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"/_cms/v1/locales\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "I2roEMCeDsYTM88zFa9Ue",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/_cms/v1/locales\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "Ocqgys_M263uIbQtEYr5M",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/_cms/v1/locales\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "acBwY91vK3FrVI7dWXTVu"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"items\": [\n    {\n      \"key\": \"\",\n      \"displayName\": \"\",\n      \"isEnabled\": false,\n      \"routeSegment\": \"\",\n      \"sortOrder\": \"\",\n      \"accessRights\": [\n        {\n          \"name\": \"\",\n          \"type\": \"\"\n        }\n      ],\n      \"created\": \"\",\n      \"createdBy\": \"\",\n      \"lastModified\": \"\",\n      \"lastModifiedBy\": \"\"\n    }\n  ],\n  \"pageIndex\": \"\",\n  \"pageSize\": \"\",\n  \"totalCount\": \"\"\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Forbidden\n"
        },
        {
          "id": "response-3-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}