---
title: Get information about a message template
slug: campaign/api/get-information-about-a-message-template
docTags: 
createdAt: 2026-09-02T15:04:15.718Z
---

{
  "id": "Pu1hX2YYu1aWp7eK9mGz3",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.campaign.episerver.net/rest/{clientId}/messagetemplates/{messageTemplateId}",
    "servers": [
      {
        "url": "https://api.campaign.episerver.net/rest/{clientId}/messagetemplates/{messageTemplateId}"
      }
    ],
    "name": "Get information about a message template",
    "description": "<p>Get detailed information about a message template, such as reply-to address, subject, format or creation date.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "clientId",
          "type": "string",
          "description": "Client ID"
        },
        {
          "kind": "required",
          "name": "messageTemplateId",
          "type": "integer<int64>",
          "description": "Message template ID",
          "format": "int64"
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json",
            "application/vnd.optivo.broadmail.v1+json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Authorization",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The message template was retrieved successfully.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "RestMessageTemplate",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Message template ID",
                "format": "int64"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "description": "Message template name"
              },
              {
                "name": "contentId",
                "kind": "optional",
                "type": "string",
                "description": "Content ID of the message template"
              },
              {
                "name": "contentTemplate",
                "kind": "optional",
                "type": "string",
                "description": "Content template"
              },
              {
                "name": "mediaType",
                "kind": "optional",
                "type": "string",
                "description": "Media type of the message template"
              },
              {
                "name": "senderAddress",
                "kind": "optional",
                "type": "string",
                "description": "Email address of the sender"
              },
              {
                "name": "senderName",
                "kind": "optional",
                "type": "string",
                "description": "Sender name",
                "example": "Episerver GmbH"
              },
              {
                "name": "replyToAddress",
                "kind": "optional",
                "type": "string",
                "description": "Email address for reply mails"
              },
              {
                "name": "replyToName",
                "kind": "optional",
                "type": "string",
                "description": "Name for reply mails"
              },
              {
                "name": "subject",
                "kind": "optional",
                "type": "map",
                "description": "Subjects",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "format",
                "kind": "optional",
                "type": "string",
                "description": "Format"
              },
              {
                "name": "dispatchOption",
                "kind": "optional",
                "type": "string",
                "description": "Dispatch option of the message template"
              },
              {
                "name": "dispatchStrategyOption",
                "kind": "optional",
                "type": "string",
                "description": "Dispatch strategy option of the message template"
              },
              {
                "name": "accumulateMessagesForDays",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "Number of messages per day",
                "format": "int32"
              },
              {
                "name": "created",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "Creation date",
                "format": "date-time"
              },
              {
                "name": "modified",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "Modification date",
                "format": "date-time"
              },
              {
                "name": "links",
                "kind": "optional",
                "type": "array",
                "description": "Restful links",
                "example": "",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "uriBuilder",
                    "kind": "optional",
                    "type": "object",
                    "description": "",
                    "example": "",
                    "schema": []
                  },
                  {
                    "name": "rels",
                    "kind": "optional",
                    "type": "array",
                    "description": "",
                    "example": "",
                    "itemType": "string",
                    "customType": "string[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "rel",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "params",
                    "kind": "optional",
                    "type": "map",
                    "description": "",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  },
                  {
                    "name": "title",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "uri",
                    "kind": "optional",
                    "type": "string<uri>",
                    "description": "",
                    "format": "uri"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/RestMessageTemplate",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "409",
        "description": "The indicated message template is not assigned to the indicated client. Ensure that \"clientId\" and \"messageTemplateId\" are correct and that the \"messageTemplateId\" is assigned to the indicated client.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "HTl_aiz8RoXPr8HYP0srd",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url https://api.campaign.episerver.net/rest/{clientId}/messagetemplates/{messageTemplateId} \\\n     --header 'accept: application/json'"
        },
        {
          "id": "spPZUkiHGUfAOnjRqeGX5",
          "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.campaign.episerver.net/rest/{clientId}/messagetemplates/{messageTemplateId}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "8yusqBpEkl5gvFJAeX8Cl",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.campaign.episerver.net/rest/{clientId}/messagetemplates/{messageTemplateId}\")\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": "ux97_aCTuFrHB8bYtdMmG",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.campaign.episerver.net/rest/{clientId}/messagetemplates/{messageTemplateId}\"\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": "HTl_aiz8RoXPr8HYP0srd"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The message template was retrieved successfully.\n{\n  \"id\": \"\",\n  \"name\": \"\",\n  \"contentId\": \"\",\n  \"contentTemplate\": \"\",\n  \"mediaType\": \"\",\n  \"senderAddress\": \"\",\n  \"senderName\": \"Episerver GmbH\",\n  \"replyToAddress\": \"\",\n  \"replyToName\": \"\",\n  \"subject\": \"\",\n  \"format\": \"\",\n  \"dispatchOption\": \"\",\n  \"dispatchStrategyOption\": \"\",\n  \"accumulateMessagesForDays\": \"\",\n  \"created\": \"\",\n  \"modified\": \"\",\n  \"links\": [\n    {\n      \"uriBuilder\": {},\n      \"rels\": [\n        \"\"\n      ],\n      \"rel\": \"\",\n      \"type\": \"\",\n      \"params\": \"\",\n      \"title\": \"\",\n      \"uri\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "response-1-409",
          "language": "409",
          "code": "// The indicated message template is not assigned to the indicated client. Ensure that \"clientId\" and \"messageTemplateId\" are correct and that the \"messageTemplateId\" is assigned to the indicated client.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}