---
title: GET /compose/content-schemas/{schema_id}
slug: content-marketing-platform/api/get-composecontent-schemasschemaid
docTags: 
createdAt: 2026-10-18T11:50:10.401Z
---

{
  "id": "QhUpxuJUEXn81v2JqH9c7",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.cmp.optimizely.com/v3/compose/content-schemas/{schema_id}",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/compose/content-schemas/{schema_id}",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "GET /compose/content-schemas/{schema_id}",
    "description": "<p>Experimental Get a content schema. Returns 403 if Compose is not enabled for the organization.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "schema_id",
          "type": "string",
          "example": "blog_post",
          "description": "<p>The <code>api_id</code> or the internal <code>id</code> of the content schema</p>"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "OAuth2",
          "name": "OAuth2",
          "kind": "optional",
          "type": "oauth2",
          "oauth2Flows": {
            "clientCredentials": {
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {}
            },
            "authorizationCode": {
              "authorizationUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/auth",
              "tokenUrl": "https://accounts.cmp.optimizely.com/o/oauth2/v1/token",
              "scopes": {
                "openid": "Grants the ability to receive a unique identifier for the user.",
                "profile": "Grants access to user profile information.",
                "offline_access": "Grants the ability to refresh access_token using the refresh token even when user is not present (not logged in)."
              }
            }
          },
          "requiredScopes": [
            "openid",
            "profile",
            "offline_access"
          ]
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Fetched content schema",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ComposeContentSchemaResponse",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Internal identifier of the content schema",
                "example": "db5lfu5h7f0s1otndoug"
              },
              {
                "name": "api_id",
                "kind": "required",
                "type": "string",
                "description": "<p>Identifier of the content schema, used in <code>schema_id</code> when creating compose content</p>",
                "example": "blog_post"
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "Name of the content schema",
                "example": "Blog Post"
              },
              {
                "name": "description",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "Description of the content schema",
                "example": "A blog post with a title and a body"
              },
              {
                "name": "display_field_id",
                "kind": "required",
                "type": "string",
                "nullable": true,
                "description": "Field used as the display title of a compose content",
                "example": "title"
              },
              {
                "name": "fields",
                "kind": "required",
                "type": "array",
                "description": "Fields of the content schema",
                "modelRef": "#/components/schemas/ComposeFieldDefinition",
                "customType": "ComposeFieldDefinition[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "Internal identifier of the field",
                    "example": "db5lgh5h7f0s1otndp90"
                  },
                  {
                    "name": "api_id",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>Identifier of the field. Use it as the key in compose content <code>fields</code>.</p>",
                    "example": "title"
                  },
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "Display name of the field",
                    "example": "Title"
                  },
                  {
                    "name": "type",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>Type of the field. For example <code>string</code>, <code>boolean</code>, <code>object</code>, <code>list</code>, <code>date_time</code>, <code>rich_text</code>, <code>reference</code> or <code>embedded_schema</code>.</p>",
                    "example": "string"
                  },
                  {
                    "name": "required",
                    "kind": "required",
                    "type": "boolean",
                    "description": "Whether the field must have a value before the content can be published",
                    "example": false
                  },
                  {
                    "name": "localized",
                    "kind": "required",
                    "type": "boolean",
                    "description": "Whether the field holds a separate value per locale",
                    "example": true
                  },
                  {
                    "name": "items",
                    "kind": "required",
                    "type": "object",
                    "nullable": true,
                    "description": "Definition of the list items. Set only for list fields.",
                    "example": "",
                    "schema": [
                      {
                        "name": "type",
                        "kind": "required",
                        "type": "string",
                        "description": "Type of each item in the list",
                        "example": "string"
                      },
                      {
                        "name": "link_type",
                        "kind": "required",
                        "type": "string",
                        "nullable": true,
                        "description": "Target type when the items are references",
                        "example": ""
                      },
                      {
                        "name": "validations",
                        "kind": "required",
                        "type": "array",
                        "nullable": true,
                        "description": "Validation rules applied to each item",
                        "example": "",
                        "itemType": "object",
                        "customType": "object[]",
                        "itemExample": "",
                        "itemDefault": ""
                      }
                    ]
                  },
                  {
                    "name": "validations",
                    "kind": "required",
                    "type": "array",
                    "nullable": true,
                    "description": "Validation rules of the field",
                    "example": "[{\"size\":{\"min\":1,\"max\":60}}]",
                    "itemType": "object",
                    "customType": "object[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "link_type",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "Target type of a reference field",
                    "example": ""
                  }
                ]
              },
              {
                "name": "version",
                "kind": "required",
                "type": "integer",
                "description": "Version of the content schema",
                "example": 2
              },
              {
                "name": "created_at",
                "kind": "required",
                "type": "string<date-time>",
                "description": "<p>Date and time on which the content schema was created, in ISO 8601 UTC format</p>",
                "example": "2026-10-11T09:33:44Z",
                "format": "date-time"
              },
              {
                "name": "updated_at",
                "kind": "required",
                "type": "string<date-time>",
                "description": "<p>Date and time of the most recent update of the content schema, in ISO 8601 UTC format</p>",
                "example": "2026-10-11T09:35:00Z",
                "format": "date-time"
              },
              {
                "name": "links",
                "kind": "required",
                "type": "object",
                "description": "Meta links",
                "example": "",
                "schema": [
                  {
                    "name": "self",
                    "kind": "required",
                    "type": "string",
                    "description": "URL of the content schema",
                    "example": "https://api.cmp.optimizely.com/v3/compose/content-schemas/blog_post"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ComposeContentSchemaResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Client error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Unsupported arguments: a,b,c\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Authorization error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Unauthorized\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Permission error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"You do not have the permission to perform this operation\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"message\":\"Resource not found\"}",
            "description": "Error payload",
            "customType": "Error",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": "Message describing the error",
                "example": "Not found"
              },
              {
                "name": "errors",
                "kind": "optional",
                "type": "map",
                "description": "Additional information",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "qqpPJSK6K7EVUM8kMYiru",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.cmp.optimizely.com/v3/compose/content-schemas/{schema_id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "TRpTJHzDLzSbCPw6yKHue",
          "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.cmp.optimizely.com/v3/compose/content-schemas/{schema_id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "A6Vltu0mSDoTO68V_xBQK",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cmp.optimizely.com/v3/compose/content-schemas/{schema_id}\")\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": "_EjROagEIdp8Mkq4IFjnY",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/compose/content-schemas/{schema_id}\"\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": "qqpPJSK6K7EVUM8kMYiru"
    },
    "results": {
      "languages": [
        {
          "id": "Z_HsE6EELjfgm1zhmMbpy",
          "language": "200",
          "code": "// Fetched content schema\n{\n  \"id\": \"db5lfu5h7f0s1otndoug\",\n  \"api_id\": \"blog_post\",\n  \"name\": \"Blog Post\",\n  \"description\": \"A blog post with a title and a body\",\n  \"display_field_id\": \"title\",\n  \"fields\": [\n    {\n      \"id\": \"db5lgh5h7f0s1otndp90\",\n      \"api_id\": \"title\",\n      \"name\": \"Title\",\n      \"type\": \"string\",\n      \"required\": false,\n      \"localized\": true,\n      \"items\": {\n        \"type\": \"string\",\n        \"link_type\": \"\",\n        \"validations\": [\n          {}\n        ]\n      },\n      \"validations\": [\n        {}\n      ],\n      \"link_type\": \"\"\n    }\n  ],\n  \"version\": 2,\n  \"created_at\": \"2026-10-11T09:33:44Z\",\n  \"updated_at\": \"2026-10-11T09:35:00Z\",\n  \"links\": {\n    \"self\": \"https://api.cmp.optimizely.com/v3/compose/content-schemas/blog_post\"\n  }\n}"
        },
        {
          "id": "NTATWBS5ymwk0dIxPA9iH",
          "language": "400",
          "code": "// Client error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "JM5tMtdPq3_3ImWqxJywG",
          "language": "401",
          "code": "// Authorization error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "oeX5J12_osgT8vUNZLuyZ",
          "language": "403",
          "code": "// Permission error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "yMee9AO9TDznSu4jYtRTd",
          "language": "404",
          "code": "// Not found error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "Z_HsE6EELjfgm1zhmMbpy"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}