---
title: GET /tasks/{task_id}/compose-contents/{content_id}
slug: content-marketing-platform/api/get-taskstaskidcompose-contentscontentid
docTags: 
createdAt: 2026-10-18T11:50:10.401Z
---

{
  "id": "XWIOtdydALH-ZXqlI1bgc",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.cmp.optimizely.com/v3/tasks/{task_id}/compose-contents/{content_id}",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/tasks/{task_id}/compose-contents/{content_id}",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "GET /tasks/{task_id}/compose-contents/{content_id}",
    "description": "<p>Experimental Get a compose content of a task, with its current (draft) field values. Reference and embedded schema fields are returned as links only. An embedded child content can also be fetched by its own id when its parent content belongs to the task.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "task_id",
          "type": "string",
          "example": "645cb61c966d0c591320f636",
          "description": "Unique identifier of the task"
        },
        {
          "kind": "required",
          "name": "content_id",
          "type": "string",
          "example": "db5lh0dh7f0s1otndpp0",
          "description": "Unique identifier of the compose content"
        }
      ],
      "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 compose content",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "TaskComposeContentResponse",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Unique identifier of the compose content",
                "example": "db5lh0dh7f0s1otndpp0"
              },
              {
                "name": "content_schema_id",
                "kind": "required",
                "type": "string",
                "description": "Internal identifier of the content schema of the compose content",
                "example": "db5lfu5h7f0s1otndoug"
              },
              {
                "name": "status",
                "kind": "required",
                "type": "string<draft | changed | published | archived | >",
                "nullable": true,
                "description": "Status of the compose content",
                "example": "draft",
                "enum": [
                  "draft",
                  "changed",
                  "published",
                  "archived",
                  "null"
                ]
              },
              {
                "name": "version",
                "kind": "required",
                "type": "integer",
                "description": "Current version number of the compose content",
                "example": 1
              },
              {
                "name": "published_version",
                "kind": "required",
                "type": "integer",
                "nullable": true,
                "description": "<p>Version number that is currently published. <code>null</code> if the content was never published.</p>",
                "example": ""
              },
              {
                "name": "created_at",
                "kind": "required",
                "type": "string<date-time>",
                "description": "<p>Date and time on which the compose content was created, in ISO 8601 UTC format</p>",
                "example": "2026-10-11T09:36:01Z",
                "format": "date-time"
              },
              {
                "name": "updated_at",
                "kind": "required",
                "type": "string<date-time>",
                "description": "<p>Date and time of the most recent update of the compose content, in ISO 8601 UTC format</p>",
                "example": "2026-10-11T09:36:11Z",
                "format": "date-time"
              },
              {
                "name": "fields",
                "kind": "required",
                "type": "object",
                "description": "<p>Field values of the compose content, keyed by the field <code>api_id</code> of the content schema. Each value is an object keyed by locale code (for example <code>en-US</code>). Fields that are not localized are still keyed by the default locale. The value type depends on the field type in the content schema. Reference and embedded schema fields are returned as links only: <code>{\"meta\": {\"id\": \"...\", \"type\": \"link\", \"link_type\": \"content\"}}</code>.</p>",
                "example": "{\"title\":{\"en-US\":\"Hello from Open API\",\"de\":\"Hallo\"},\"is_featured\":{\"en-US\":true}}",
                "modelRef": "#/components/schemas/ComposeContentFields",
                "customType": "ComposeContentFields",
                "schema": []
              },
              {
                "name": "links",
                "kind": "required",
                "type": "object",
                "description": "Meta links",
                "example": "",
                "schema": [
                  {
                    "name": "self",
                    "kind": "required",
                    "type": "string",
                    "description": "URL of the compose content",
                    "example": "https://api.cmp.optimizely.com/v3/tasks/645cb61c966d0c591320f636/compose-contents/db5lh0dh7f0s1otndpp0"
                  },
                  {
                    "name": "task",
                    "kind": "required",
                    "type": "string",
                    "description": "URL of the task",
                    "example": "https://api.cmp.optimizely.com/v3/tasks/645cb61c966d0c591320f636"
                  },
                  {
                    "name": "content_schema",
                    "kind": "required",
                    "type": "string",
                    "nullable": true,
                    "description": "URL of the content schema",
                    "example": "https://api.cmp.optimizely.com/v3/compose/content-schemas/db5lfu5h7f0s1otndoug"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/TaskComposeContentResponse",
            "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": "3T-CRXoniGRHBmUdtGLy2",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.cmp.optimizely.com/v3/tasks/{task_id}/compose-contents/{content_id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "-2i5hK10PVQNwtyncR1mp",
          "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/tasks/{task_id}/compose-contents/{content_id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "5ExvCi3zKP8c9b4CQyLXo",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cmp.optimizely.com/v3/tasks/{task_id}/compose-contents/{content_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": "_sLFbLj17TGu2_dNByHNw",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/tasks/{task_id}/compose-contents/{content_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": "3T-CRXoniGRHBmUdtGLy2"
    },
    "results": {
      "languages": [
        {
          "id": "kkMJEv82bHMFtJhDvJ-HH",
          "language": "200",
          "code": "// Fetched compose content\n{\n  \"id\": \"db5lh0dh7f0s1otndpp0\",\n  \"content_schema_id\": \"db5lfu5h7f0s1otndoug\",\n  \"status\": \"draft\",\n  \"version\": 1,\n  \"published_version\": 0,\n  \"created_at\": \"2026-10-11T09:36:01Z\",\n  \"updated_at\": \"2026-10-11T09:36:11Z\",\n  \"fields\": {},\n  \"links\": {\n    \"self\": \"https://api.cmp.optimizely.com/v3/tasks/645cb61c966d0c591320f636/compose-contents/db5lh0dh7f0s1otndpp0\",\n    \"task\": \"https://api.cmp.optimizely.com/v3/tasks/645cb61c966d0c591320f636\",\n    \"content_schema\": \"https://api.cmp.optimizely.com/v3/compose/content-schemas/db5lfu5h7f0s1otndoug\"\n  }\n}"
        },
        {
          "id": "o6mhiUhvUloY-_vfX24O6",
          "language": "400",
          "code": "// Client error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "GtPvR8l5lV8slQaTR9MD5",
          "language": "401",
          "code": "// Authorization error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "znqHr4HSPmrfOxQQ63a72",
          "language": "403",
          "code": "// Permission error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "R_-6kaOhVvrEPuAyz4QgY",
          "language": "404",
          "code": "// Not found error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "kkMJEv82bHMFtJhDvJ-HH"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}