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

{
  "id": "7sBelrrNdS0Mbk3GkP8JX",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.campaign.episerver.net/rest/{clientId}/messagetemplates",
    "servers": [
      {
        "url": "https://api.campaign.episerver.net/rest/{clientId}/messagetemplates"
      }
    ],
    "name": "Get information about all message templates",
    "description": "<p>Get detailed information about all message templates, such as format, subject, reply-to address or creation date. You can filter for messages in a folder or limit the number of retrieved message templates.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "clientId",
          "type": "string",
          "description": "Client ID"
        }
      ],
      "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": [
        {
          "kind": "optional",
          "name": "offset",
          "type": "integer<int32>",
          "description": "<p>Starting point of the result list Default value : 0</p>",
          "format": "int32"
        },
        {
          "kind": "optional",
          "name": "limit",
          "type": "integer<int32>",
          "description": "<p>Maximum number of retrieved message templates Default value : 100</p>",
          "format": "int32"
        },
        {
          "kind": "optional",
          "name": "sort",
          "type": "string",
          "description": "Sort result by specific criteria",
          "default": "created",
          "enum": [
            "id",
            "name",
            "contentId",
            "contentTemplate",
            "mediaType",
            "created",
            "createdBy",
            "modified",
            "modifiedBy"
          ]
        },
        {
          "kind": "optional",
          "name": "folderId",
          "type": "integer<int64>",
          "description": "Filter message templates assigned to a folder",
          "format": "int64"
        },
        {
          "kind": "optional",
          "name": "direction",
          "type": "string",
          "description": "Sort order",
          "enum": [
            "ASC",
            "DESC"
          ]
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Authorization",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>The message templates were retrieved successfully (empty result if none was found).</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "RestMessageTemplateStreamingCollection",
            "schema": [
              {
                "name": "elements",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/RestMessageTemplate",
                "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"
                      }
                    ]
                  }
                ]
              },
              {
                "name": "count",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "offset",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              },
              {
                "name": "limit",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "",
                "format": "int32"
              }
            ],
            "modelRef": "#/components/schemas/RestMessageTemplateStreamingCollection",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Invalid limit request. Change the limit to less than 10000.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "9pDb26GlkwUl-vDeiZRnz",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.campaign.episerver.net/rest/{clientId}/messagetemplates?sort=created' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "xpLX5kAjbNR-CWdaBYFzA",
          "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?sort=created\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "2wGM08C4s4KgZZtyzoMGD",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.campaign.episerver.net/rest/{clientId}/messagetemplates?sort=created\")\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": "QF5ntXfXMB2CJKAUOADpq",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.campaign.episerver.net/rest/{clientId}/messagetemplates?sort=created\"\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": "9pDb26GlkwUl-vDeiZRnz"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The message templates were retrieved successfully (empty result if none was found).\n{\n  \"elements\": [\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    }\n  ],\n  \"count\": \"\",\n  \"offset\": \"\",\n  \"limit\": \"\"\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Invalid limit request. Change the limit to less than 10000.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}