---
title: GET /templates/{template_id}
slug: content-marketing-platform/api/get-templatestemplateid
docTags: 
createdAt: 2026-10-01T18:51:26.265Z
---

{
  "id": "OOYtbw-WEc2Rk5EwqCLAM",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.cmp.optimizely.com/v3/templates/{template_id}",
    "servers": [
      {
        "url": "https://api.cmp.optimizely.com/v3/templates/{template_id}",
        "description": "v3 version of Optimizely CMP Open API"
      }
    ],
    "name": "GET /templates/{template_id}",
    "description": "<p>Experimental Get a template by ID.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "template_id",
          "type": "string",
          "example": "9119a313057e401189407116fcd3aa24",
          "description": "Unique identifier of the template"
        }
      ],
      "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 template",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "example": "{\"id\":\"9119a313057e401189407116fcd3aa24\",\"is_active\":true,\"title\":\"Sample Template Title\",\"description\":\"Sample Desciption\",\"applicable_to\":[\"campaign_brief\",\"task_brief\",\"work_request\"],\"form_fields\":[{\"identifier\":\"attachment\",\"label\":\"Attach a file...\",\"helper_text\":\"Sample helper text\",\"is_required\":false,\"is_readonly\":false,\"sort_order\":0,\"type\":\"file\",\"type_specific_meta\":null,\"logic_rules\":[{\"condition\":{\"operator\":\"any_of\",\"values\":[\"4a8b901e9fd911ecbefa0242ac160019\"]},\"action\":{\"target_field\":{\"identifier\":\"70ca0e8a954911ecb4be0242ac160014\"},\"type\":\"show_values\",\"values\":[\"73e05aa2b5d311eca17f0242ac160019\"]}}]},{\"identifier\":\"73e05aa2b54nda3c320242ac1d5291\",\"label\":\"Select publish destination\",\"helper_text\":\"Sample helper text\",\"is_required\":true,\"is_readonly\":false,\"sort_order\":1,\"type\":\"dropdown\",\"type_specific_meta\":{\"is_multi_select\":false,\"choices\":[{\"id\":\"62553abbb7def00b4e60ded5\",\"name\":\"Sample Dropdown Field Choice\"}]},\"logic_rules\":[]},{\"identifier\":\"73e05aa2b54nda3c320242ac1d5291\",\"label\":\"Input value\",\"helper_text\":\"Sample helper text\",\"is_required\":false,\"is_readonly\":false,\"sort_order\":2,\"type\":\"simple_number\",\"type_specific_meta\":{\"decimal_places\":3,\"has_thousand_separator\":false},\"logic_rules\":[]},{\"identifier\":\"73e05aa2b54nda3c320242ac1d5291\",\"label\":\"Input value\",\"helper_text\":\"Sample helper text\",\"is_required\":false,\"is_readonly\":false,\"sort_order\":3,\"type\":\"percentage_number\",\"type_specific_meta\":{\"decimal_places\":3},\"logic_rules\":[]},{\"identifier\":\"73e05aa2b54nda3c320242ac1d5291\",\"label\":\"Input value\",\"helper_text\":\"Sample helper text\",\"is_required\":false,\"is_readonly\":false,\"sort_order\":4,\"type\":\"currency_number\",\"type_specific_meta\":{\"decimal_places\":2,\"currency_code\":\"USD\",\"has_thousand_separator\":true},\"logic_rules\":[]},{\"identifier\":\"73e05aa2b54nda3c320242ac1d5291\",\"label\":\"Input value\",\"helper_text\":\"Sample helper text\",\"is_required\":false,\"is_readonly\":false,\"sort_order\":5,\"type\":\"richtext\",\"type_specific_meta\":null,\"logic_rules\":[]},{\"identifier\":\"73e05aa2b54nda3c320242ac1d5291\",\"label\":\"Another section\",\"helper_text\":\"Sample helper text\",\"is_required\":false,\"is_readonly\":true,\"sort_order\":5,\"type\":\"section\",\"type_specific_meta\":null,\"logic_rules\":[]},{\"identifier\":\"73e05aa2b54nda3c320242ac1d5291\",\"label\":\"select value\",\"helper_text\":\"Sample helper text\",\"is_required\":false,\"is_readonly\":false,\"sort_order\":7,\"type\":\"radio_button\",\"type_specific_meta\":{\"is_multi_select\":false,\"choices\":[{\"id\":\"62553abbb7def00b4e60ded5\",\"name\":\"Sample MultiChoice Field Choice\"}]},\"logic_rules\":[]},{\"identifier\":\"73e05aa2b54nda3c320242ac1d5291\",\"label\":\"select value\",\"helper_text\":\"Sample helper text\",\"is_required\":false,\"is_readonly\":false,\"sort_order\":8,\"type\":\"label\",\"type_specific_meta\":{\"is_multi_select\":false,\"choices\":[{\"id\":\"9119a313057e401189407116fcd3\",\"name\":\"Sample Label\"}]},\"logic_rules\":[]}]}",
            "description": "",
            "customType": "TemplateResponse",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Unique identifier of the template",
                "example": "9119a313057e401189407116fcd3aa24"
              },
              {
                "name": "is_active",
                "kind": "required",
                "type": "boolean",
                "description": "Active status of the template",
                "example": true
              },
              {
                "name": "title",
                "kind": "required",
                "type": "string",
                "description": "Title of the template",
                "example": "Sample Template Title"
              },
              {
                "name": "description",
                "kind": "required",
                "type": "string",
                "description": "Description of the template",
                "example": "Sample Desciption"
              },
              {
                "name": "applicable_to",
                "kind": "required",
                "type": "array",
                "description": "List of resources the template is applicable to",
                "example": "[\"work_request\"]",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "work_request",
                "itemDefault": ""
              },
              {
                "name": "form_fields",
                "kind": "required",
                "type": "object",
                "description": "List of form fields",
                "modelRef": "#/components/schemas/TemplateInstructionFormField",
                "customType": "TemplateInstructionFormField[]",
                "schema": [],
                "complexType": "allOf",
                "complexItems": [
                  {
                    "name": "BaseTemplateFormField",
                    "description": "",
                    "modelRef": "#/components/schemas/BaseTemplateFormField",
                    "schema": [
                      {
                        "name": "identifier",
                        "kind": "required",
                        "type": "string",
                        "description": "Identifier of the field",
                        "example": "attachment"
                      },
                      {
                        "name": "label",
                        "kind": "required",
                        "type": "string",
                        "nullable": true,
                        "description": "Label of the field",
                        "example": "Attach a file..."
                      },
                      {
                        "name": "helper_text",
                        "kind": "required",
                        "type": "string",
                        "nullable": true,
                        "description": "Helper text of the field",
                        "example": "Sample helper text"
                      },
                      {
                        "name": "is_required",
                        "kind": "required",
                        "type": "boolean",
                        "description": "Required status of the field",
                        "example": false
                      },
                      {
                        "name": "is_readonly",
                        "kind": "required",
                        "type": "boolean",
                        "description": "Specify if the field can be used to create any resource",
                        "example": false
                      },
                      {
                        "name": "is_protected",
                        "kind": "optional",
                        "type": "boolean",
                        "description": "<p>True when this form field is read-only and only organization admins can modify it. Absent or false for editable fields.</p>",
                        "example": false
                      },
                      {
                        "name": "sort_order",
                        "kind": "required",
                        "type": "integer",
                        "description": "Sort order of the field",
                        "example": 0
                      },
                      {
                        "name": "type",
                        "kind": "required",
                        "type": "string<brief | checkbox | currency_number | date | dropdown | file | instruction | label | percentage_number | radio_button | richtext | section | simple_number | text | text_area>",
                        "description": "Type of the field",
                        "example": "label",
                        "enum": [
                          "brief",
                          "checkbox",
                          "currency_number",
                          "date",
                          "dropdown",
                          "file",
                          "instruction",
                          "label",
                          "percentage_number",
                          "radio_button",
                          "richtext",
                          "section",
                          "simple_number",
                          "text",
                          "text_area"
                        ]
                      }
                    ]
                  },
                  {
                    "name": "object",
                    "description": "",
                    "schema": [
                      {
                        "name": "type_specific_meta",
                        "kind": "required",
                        "type": "object",
                        "description": "<p>Type-specific meta-information</p>",
                        "example": "",
                        "schema": [
                          {
                            "name": "description",
                            "kind": "required",
                            "type": "string",
                            "description": "Description of the field",
                            "example": "just a message to inform something"
                          }
                        ]
                      },
                      {
                        "name": "logic_rules",
                        "kind": "required",
                        "type": "array",
                        "description": "List of logic rules",
                        "modelRef": "#/components/schemas/TemplateLogicRule",
                        "customType": "TemplateLogicRule",
                        "schema": []
                      }
                    ]
                  }
                ]
              },
              {
                "name": "links",
                "kind": "required",
                "type": "object",
                "description": "Meta links",
                "example": "",
                "schema": [
                  {
                    "name": "self",
                    "kind": "required",
                    "type": "string",
                    "description": "URL of the template",
                    "example": "https://api.cmp.optimizely.com/v3/templates/9119a313057e401189407116fcd3aa24"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/TemplateResponse",
            "complexItems": [
              {
                "name": "object",
                "schema": [
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "Unique identifier of the template",
                    "example": "9119a313057e401189407116fcd3aa24"
                  },
                  {
                    "name": "is_active",
                    "kind": "required",
                    "type": "boolean",
                    "description": "Active status of the template",
                    "example": true
                  },
                  {
                    "name": "title",
                    "kind": "required",
                    "type": "string",
                    "description": "Title of the template",
                    "example": "Sample Template Title"
                  },
                  {
                    "name": "description",
                    "kind": "required",
                    "type": "string",
                    "description": "Description of the template",
                    "example": "Sample Desciption"
                  },
                  {
                    "name": "applicable_to",
                    "kind": "required",
                    "type": "array",
                    "description": "List of resources the template is applicable to",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "work_request",
                    "itemDefault": ""
                  }
                ],
                "modelRef": "#/components/schemas/BaseTemplateResponse",
                "customType": "BaseTemplateResponse"
              },
              {
                "name": "object",
                "schema": [
                  {
                    "name": "form_fields",
                    "kind": "required",
                    "type": "object",
                    "description": "List of form fields",
                    "modelRef": "#/components/schemas/TemplateInstructionFormField",
                    "customType": "TemplateInstructionFormField[]",
                    "schema": [],
                    "complexType": "allOf",
                    "complexItems": [
                      {
                        "name": "BaseTemplateFormField",
                        "description": "",
                        "modelRef": "#/components/schemas/BaseTemplateFormField",
                        "schema": [
                          {
                            "name": "identifier",
                            "kind": "required",
                            "type": "string",
                            "description": "Identifier of the field",
                            "example": "attachment"
                          },
                          {
                            "name": "label",
                            "kind": "required",
                            "type": "string",
                            "nullable": true,
                            "description": "Label of the field",
                            "example": "Attach a file..."
                          },
                          {
                            "name": "helper_text",
                            "kind": "required",
                            "type": "string",
                            "nullable": true,
                            "description": "Helper text of the field",
                            "example": "Sample helper text"
                          },
                          {
                            "name": "is_required",
                            "kind": "required",
                            "type": "boolean",
                            "description": "Required status of the field",
                            "example": false
                          },
                          {
                            "name": "is_readonly",
                            "kind": "required",
                            "type": "boolean",
                            "description": "Specify if the field can be used to create any resource",
                            "example": false
                          },
                          {
                            "name": "is_protected",
                            "kind": "optional",
                            "type": "boolean",
                            "description": "<p>True when this form field is read-only and only organization admins can modify it. Absent or false for editable fields.</p>",
                            "example": false
                          },
                          {
                            "name": "sort_order",
                            "kind": "required",
                            "type": "integer",
                            "description": "Sort order of the field",
                            "example": 0
                          },
                          {
                            "name": "type",
                            "kind": "required",
                            "type": "string<brief | checkbox | currency_number | date | dropdown | file | instruction | label | percentage_number | radio_button | richtext | section | simple_number | text | text_area>",
                            "description": "Type of the field",
                            "example": "label",
                            "enum": [
                              "brief",
                              "checkbox",
                              "currency_number",
                              "date",
                              "dropdown",
                              "file",
                              "instruction",
                              "label",
                              "percentage_number",
                              "radio_button",
                              "richtext",
                              "section",
                              "simple_number",
                              "text",
                              "text_area"
                            ]
                          }
                        ]
                      },
                      {
                        "name": "object",
                        "description": "",
                        "schema": [
                          {
                            "name": "type_specific_meta",
                            "kind": "required",
                            "type": "object",
                            "description": "<p>Type-specific meta-information</p>",
                            "example": "",
                            "schema": [
                              {
                                "name": "description",
                                "kind": "required",
                                "type": "string",
                                "description": "Description of the field",
                                "example": "just a message to inform something"
                              }
                            ]
                          },
                          {
                            "name": "logic_rules",
                            "kind": "required",
                            "type": "array",
                            "description": "List of logic rules",
                            "modelRef": "#/components/schemas/TemplateLogicRule",
                            "customType": "TemplateLogicRule",
                            "schema": []
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "name": "links",
                    "kind": "required",
                    "type": "object",
                    "description": "Meta links",
                    "example": "",
                    "schema": [
                      {
                        "name": "self",
                        "kind": "required",
                        "type": "string",
                        "description": "URL of the template",
                        "example": "https://api.cmp.optimizely.com/v3/templates/9119a313057e401189407116fcd3aa24"
                      }
                    ]
                  }
                ]
              }
            ],
            "complexType": "allOf",
            "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": "OaMZgZzT5MPli6_Hg04bb",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.cmp.optimizely.com/v3/templates/{template_id} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "Q-Ohi1IRLW3SUk07g4GLS",
          "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/templates/{template_id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "mOjqOo5bVUgTQbROOoCrn",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.cmp.optimizely.com/v3/templates/{template_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": "qFxeFF0O0PzW6lcc0hGu6",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.cmp.optimizely.com/v3/templates/{template_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": "OaMZgZzT5MPli6_Hg04bb"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// Fetched template\n{\n  \"id\": \"9119a313057e401189407116fcd3aa24\",\n  \"is_active\": true,\n  \"title\": \"Sample Template Title\",\n  \"description\": \"Sample Desciption\",\n  \"applicable_to\": [\n    \"work_request\"\n  ],\n  \"form_fields\": {},\n  \"links\": {\n    \"self\": \"https://api.cmp.optimizely.com/v3/templates/9119a313057e401189407116fcd3aa24\"\n  }\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Authorization error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-2-403",
          "language": "403",
          "code": "// Permission error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        },
        {
          "id": "response-3-404",
          "language": "404",
          "code": "// Not found error\n{\n  \"message\": \"Not found\",\n  \"errors\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}