---
title: Get the content of a mailing (email)
slug: campaign/api/hYvV-get-the-content-of-a-mailing-email
docTags: 
createdAt: 2026-09-02T15:04:15.718Z
---

{
  "id": "_4ZC-Ngw7I_Nd_Fn45e-J",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.campaign.episerver.net/rest/{clientId}/confirmations/{confirmationMailId}/message/content",
    "servers": [
      {
        "url": "https://api.campaign.episerver.net/rest/{clientId}/confirmations/{confirmationMailId}/message/content"
      }
    ],
    "name": "Get the content of a mailing (email)",
    "description": "<p>Get the content of a mailing (email) and define the content type to be delivered.</p>",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "clientId",
          "type": "string",
          "description": "Client ID"
        },
        {
          "kind": "required",
          "name": "confirmationMailId",
          "type": "integer<int64>",
          "description": "Confirmation mailing ID",
          "format": "int64"
        }
      ],
      "headerParameters": [
        {
          "kind": "optional",
          "name": "Accept",
          "type": "string",
          "description": "<p>Controls which content type is used Available values : text/plain, text/htmlDefault value : text/plainDoes not work with the \"Try it out\" feature.</p>"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "source",
          "type": "string",
          "description": "",
          "default": "message",
          "enum": [
            "EDITOR",
            "MESSAGE"
          ]
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Authorization",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "<p>The content of the mailing (in the indicated content type) was retrieved successfully.</p>",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "404",
        "description": "No content could be found for the indicated content type. Ensure that the \"Accept\" parameter has the correct content type and the content exists.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "406",
        "description": "The content type is not supported. Ensure that the \"Accept\" parameter has the correct content type.",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "XyKf6p4IABFxIndKn2FTP",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request GET \\\n     --url 'https://api.campaign.episerver.net/rest/{clientId}/confirmations/{confirmationMailId}/message/content?source=message' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "MMXq4FFPFDESw1IaYM5OS",
          "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}/confirmations/{confirmationMailId}/message/content?source=message\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "jaIB1oXHSxuDg8dEgKgF-",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.campaign.episerver.net/rest/{clientId}/confirmations/{confirmationMailId}/message/content?source=message\")\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": "yXiQPwjYBl4NW5eLeT3gr",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.campaign.episerver.net/rest/{clientId}/confirmations/{confirmationMailId}/message/content?source=message\"\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": "XyKf6p4IABFxIndKn2FTP"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The content of the mailing (in the indicated content type) was retrieved successfully.\n"
        },
        {
          "id": "response-1-404",
          "language": "404",
          "code": "// No content could be found for the indicated content type. Ensure that the \"Accept\" parameter has the correct content type and the content exists.\n"
        },
        {
          "id": "response-2-406",
          "language": "406",
          "code": "// The content type is not supported. Ensure that the \"Accept\" parameter has the correct content type.\n"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}