---
title: List content types
slug: cms-saas/api/list-content-types
docTags: 
createdAt: 2026-08-28T15:28:05.479Z
---

{
  "id": "zu5v9ZBneokAU30I0dgoV",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.cms.optimizely.com/v1/contenttypes",
    "servers": [
      {
        "url": "https://api.cms.optimizely.com/v1/contenttypes",
        "description": "Optimizely CMS API"
      }
    ],
    "name": "List content types",
    "description": "List content types using the provided parameters.",
    "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": "forContainerType",
          "type": "string",
          "description": "Only include types that are available for creation under the provided container type"
        },
        {
          "kind": "optional",
          "name": "sources",
          "type": "array",
          "description": "Indicates which sources should be included when listing content types. Use 'DEFAULT' to include content types without a specific source.",
          "schema": [],
          "itemType": "string",
          "customType": "string[]"
        },
        {
          "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": "https://api.cms.optimizely.com/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>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": "ContentTypePage",
            "schema": [
              {
                "name": "items",
                "kind": "optional",
                "type": "array",
                "readOnly": true,
                "description": "The items in this paged collection.",
                "modelRef": "#/components/schemas/ContentType",
                "customType": "ContentType[]",
                "schema": [
                  {
                    "name": "key",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>The unique identifier (key) of the resource.</p>",
                    "minLength": 2,
                    "maxLength": 255,
                    "pattern": "^[A-Za-z][_0-9A-Za-z]+$"
                  },
                  {
                    "name": "displayName",
                    "kind": "required",
                    "type": "string",
                    "description": "The display name of this content type.",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  {
                    "name": "description",
                    "kind": "optional",
                    "type": "string",
                    "description": "A description of this content type.",
                    "maxLength": 255
                  },
                  {
                    "name": "baseType",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "<p>The base type of this content type. Ignored for contracts; required for all other content types.</p>",
                    "example": "_page",
                    "examples": [
                      {
                        "value": "_page"
                      },
                      {
                        "value": "_component"
                      },
                      {
                        "value": "_media"
                      },
                      {
                        "value": "_image"
                      },
                      {
                        "value": "_video"
                      },
                      {
                        "value": "_folder"
                      },
                      {
                        "value": "_experience"
                      },
                      {
                        "value": "_section"
                      },
                      {
                        "value": "_element"
                      }
                    ],
                    "maxLength": 50
                  },
                  {
                    "name": "isContract",
                    "kind": "optional",
                    "type": "boolean",
                    "description": "Specifies if the content type is a contract type."
                  },
                  {
                    "name": "source",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "A string that indicates the source of this content type. Can be used to distinguish content types created by the system from types coming from model classes in the CMS solution."
                  },
                  {
                    "name": "sortOrder",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "A value that is used when sorting content type instances.",
                    "format": "int32"
                  },
                  {
                    "name": "mayContainTypes",
                    "kind": "optional",
                    "type": "array",
                    "description": "Provides a set of content types that can be created in containers of this type",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "mediaFileExtensions",
                    "kind": "optional",
                    "type": "array",
                    "description": "Provides a set of media file extensions that this content type can handle.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "compositionBehaviors",
                    "kind": "optional",
                    "type": "array",
                    "description": "Provides a set of composition behaviors specifying how this content type can be used within compositions. Currently this can only be assigned when baseType is 'component'.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "composition",
                    "kind": "optional",
                    "type": "object",
                    "description": "<p>Configures the built-in composition (the \"canvas\") for experience and section content types. Only applicable when BaseType is <code>_experience</code> or <code>_section</code>.</p>",
                    "modelRef": "#/components/schemas/CompositionConfiguration",
                    "customType": "CompositionConfiguration",
                    "schema": [
                      {
                        "name": "format",
                        "kind": "optional",
                        "type": "string",
                        "description": "<p>The layout type to use for the built-in composition (e.g. <code>outline</code> or <code>grid</code>). When empty, the default layout for the base type is used.</p>"
                      },
                      {
                        "name": "allowedTypes",
                        "kind": "optional",
                        "type": "array",
                        "description": "<p>Content types and base types that the built-in composition is permitted to contain.</p>",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      },
                      {
                        "name": "restrictedTypes",
                        "kind": "optional",
                        "type": "array",
                        "description": "<p>Content types and base types that the built-in composition is forbidden from containing.</p>",
                        "example": "",
                        "itemType": "string",
                        "customType": "string[]",
                        "itemExample": "",
                        "itemDefault": ""
                      }
                    ]
                  },
                  {
                    "name": "contracts",
                    "kind": "optional",
                    "type": "array",
                    "description": "Provides a set of contract content types that this content type is bound to.",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "created",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "A timestamp indicating when this resource was first created.",
                    "format": "date-time"
                  },
                  {
                    "name": "createdBy",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The name of the user or application that created this resource."
                  },
                  {
                    "name": "lastModified",
                    "kind": "optional",
                    "type": "string<date-time>",
                    "readOnly": true,
                    "description": "Indicates the last time this resource was modified.",
                    "format": "date-time"
                  },
                  {
                    "name": "lastModifiedBy",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "The name of the user or application that last modified this resource."
                  },
                  {
                    "name": "properties",
                    "kind": "optional",
                    "type": "map",
                    "description": "Dictionary with all custom properties of this content type.",
                    "example": "",
                    "customType": "map<string, ContentTypeProperty>",
                    "schema": []
                  },
                  {
                    "name": "accessRights",
                    "kind": "optional",
                    "type": "array",
                    "nullable": true,
                    "description": "<p>The access rights assigned to this content type that defines who can create content of this type. If no access rights are assigned, everyone will be able to create content of this type. An empty array means that no new content of this type can be created.</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",
                        "description": "The type of the security entity that this identifier references. Will default to 'role' if not specified.",
                        "example": "user",
                        "examples": [
                          {
                            "value": "user"
                          },
                          {
                            "value": "role"
                          },
                          {
                            "value": "application"
                          }
                        ],
                        "maxLength": 50
                      }
                    ]
                  }
                ]
              },
              {
                "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/ContentTypePage",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "429",
        "description": "Too Many Requests",
        "jsonExample": "",
        "isExpanded": true,
        "headers": [
          {
            "kind": "optional",
            "name": "Retry-After",
            "type": "number",
            "description": "Indicates how long the client should wait before making a new request."
          }
        ],
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ProblemDetails",
            "schema": [
              {
                "name": "type",
                "kind": "optional",
                "type": "string<uri>",
                "nullable": true,
                "description": "A URI reference that identifies the problem type.",
                "format": "uri"
              },
              {
                "name": "title",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "<p>A short, human-readable summary of the problem type.</p>"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "integer<int32>",
                "nullable": true,
                "description": "The HTTP status code generated by the origin server for this occurrence of the problem.",
                "format": "int32",
                "minimum": 100,
                "maximum": 599
              },
              {
                "name": "detail",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "<p>A human-readable explanation specific to this occurrence of the problem.</p>"
              },
              {
                "name": "instance",
                "kind": "optional",
                "type": "string<uri>",
                "nullable": true,
                "description": "A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.",
                "format": "uri"
              },
              {
                "name": "code",
                "kind": "optional",
                "type": "string",
                "nullable": true,
                "description": "Error code that identifies the problem type."
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "array",
                "nullable": true,
                "description": "An array of error details with more detailed information about the problem.",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "detail",
                    "kind": "optional",
                    "type": "string",
                    "description": "<p>A granular explanation of one specific error related to a field, header or query parameter.</p>"
                  },
                  {
                    "name": "field",
                    "kind": "optional",
                    "type": "string",
                    "nullable": true,
                    "description": "A string that may provide a hint to which field that was the source of the error.",
                    "example": "properties.header.displayName"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ProblemDetails",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal Server Error",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "s8E22zkDj9To9xytfrv_M",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.cms.optimizely.com/v1/contenttypes \\\n     --header 'accept: application/json'"
        },
        {
          "id": "_Hz_bRUgDmbZDWWcbvzSC",
          "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(\"https://api.cms.optimizely.com/v1/contenttypes\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "y3OB3SFdzEwqz1Vo9HwY9",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cms.optimizely.com/v1/contenttypes\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "5zi58CO5ajBw3F3YGe-qo",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cms.optimizely.com/v1/contenttypes\"\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": "s8E22zkDj9To9xytfrv_M"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"items\": [\n    {\n      \"key\": \"\",\n      \"displayName\": \"\",\n      \"description\": \"\",\n      \"baseType\": \"_page\",\n      \"isContract\": false,\n      \"source\": \"\",\n      \"sortOrder\": \"\",\n      \"mayContainTypes\": [\n        \"\"\n      ],\n      \"mediaFileExtensions\": [\n        \"\"\n      ],\n      \"compositionBehaviors\": [\n        \"\"\n      ],\n      \"composition\": {\n        \"format\": \"\",\n        \"allowedTypes\": [\n          \"\"\n        ],\n        \"restrictedTypes\": [\n          \"\"\n        ]\n      },\n      \"contracts\": [\n        \"\"\n      ],\n      \"created\": \"\",\n      \"createdBy\": \"\",\n      \"lastModified\": \"\",\n      \"lastModifiedBy\": \"\",\n      \"properties\": \"\",\n      \"accessRights\": [\n        {\n          \"name\": \"\",\n          \"type\": \"user\"\n        }\n      ]\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-429",
          "language": "429",
          "code": "// Too Many Requests\n{\n  \"type\": \"\",\n  \"title\": \"\",\n  \"status\": \"\",\n  \"detail\": \"\",\n  \"instance\": \"\",\n  \"code\": \"\",\n  \"errors\": [\n    {\n      \"detail\": \"\",\n      \"field\": \"properties.header.displayName\"\n    }\n  ]\n}"
        },
        {
          "id": "response-4-500",
          "language": "500",
          "code": "// Internal Server Error\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}