---
title: Update a mailing
slug: campaign/api/update-a-mailing
docTags: 
createdAt: 2026-09-02T15:04:15.718Z
---

{
  "id": "SGmqLDrk3mpn5xWYati4-",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/message",
    "servers": [
      {
        "url": "https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/message"
      }
    ],
    "name": "Update a mailing",
    "description": "<p>Update information of a mailing, such as name, subject or content.</p>",
    "contentType": "application/x-www-form-urlencoded",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "clientId",
          "type": "integer<int64>",
          "description": "Client ID",
          "format": "int64"
        },
        {
          "kind": "required",
          "name": "transactionalMailId",
          "type": "integer<int64>",
          "description": "Transactional mail 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": [
        {
          "name": "deepLinkName",
          "kind": "optional",
          "type": "string",
          "description": "<p>This parameter is deprecated. Use \"payload.[name]\" instead.</p>"
        },
        {
          "name": "mediaType",
          "kind": "optional",
          "type": "string<email | sms | push>",
          "description": "<p>Media type of the mailing (required only for creation)</p>",
          "enum": [
            "email",
            "sms",
            "push"
          ]
        },
        {
          "name": "subjectForTargetGroup",
          "kind": "optional",
          "type": "string",
          "description": "<p>Subject for a specific target group. Set \"subject.[targetGroupId]\" in request data (only email).Does not work with the \"Try it out\" feature.</p>"
        },
        {
          "name": "replyToAddress",
          "kind": "optional",
          "type": "string",
          "description": "<p>Reply-to address (only email)</p>"
        },
        {
          "name": "archiveEnabled",
          "kind": "optional",
          "type": "boolean",
          "description": "Toggle whether a mailing can be archived or not"
        },
        {
          "name": "iconMetaData",
          "kind": "optional",
          "type": "string",
          "description": "<p>Icon meta data. Configure \"icon.[attribute]\".Does not work with the \"Try it out\" feature.</p>"
        },
        {
          "name": "archivePeriod",
          "kind": "optional",
          "type": "string<ONE_MONTH | TWO_MONTHS | THREE_MONTHS | SIX_MONTHS | ONE_YEAR | TWO_YEARS>",
          "description": "Period suggesting for how long a mailing should be archived",
          "enum": [
            "ONE_MONTH",
            "TWO_MONTHS",
            "THREE_MONTHS",
            "SIX_MONTHS",
            "ONE_YEAR",
            "TWO_YEARS"
          ]
        },
        {
          "name": "resetReplyToAddress",
          "kind": "optional",
          "type": "boolean",
          "description": "<p>If true, the local part of the reply-to address is reset</p>"
        },
        {
          "name": "resetTargetedSubjects",
          "kind": "optional",
          "type": "boolean",
          "description": "<p>If true, all target group subjects are deleted (only email)</p>"
        },
        {
          "name": "replyToName",
          "kind": "optional",
          "type": "string",
          "description": "<p>Reply-to mailing name (only email)</p>"
        },
        {
          "name": "resetDeeplinks",
          "kind": "optional",
          "type": "boolean",
          "description": "This parameter is deprecated. Use \"resetPayload\" instead."
        },
        {
          "name": "resetPayload",
          "kind": "optional",
          "type": "boolean",
          "description": "<p>If true, all payload parameters are deleted. All set parameters within this request remain (only Web Push mailings).</p>"
        },
        {
          "name": "name",
          "kind": "optional",
          "type": "string",
          "description": "Mailing name"
        },
        {
          "name": "content",
          "kind": "optional",
          "type": "string",
          "description": "<p>Mailing content (plain text)</p>"
        },
        {
          "name": "payload",
          "kind": "optional",
          "type": "string",
          "description": "<p>Payload parameters for Mobile Push and Web Push. Set \"payload.[name]\" in request data.Does not work with the \"Try it out\" feature.</p>"
        },
        {
          "name": "description",
          "kind": "optional",
          "type": "string",
          "description": "Mailing description"
        },
        {
          "name": "senderName",
          "kind": "optional",
          "type": "string",
          "description": "<p>Mailing sender name (only email)</p>"
        },
        {
          "name": "subject",
          "kind": "optional",
          "type": "string",
          "description": "Mailing subject"
        },
        {
          "name": "mediaCode",
          "kind": "optional",
          "type": "string",
          "description": "<p>Media code (only email)</p>"
        },
        {
          "name": "expiry",
          "kind": "optional",
          "type": "string<date-time>",
          "description": "<p>Expiry date (only push mailings, use ISO 8601 format without milliseconds, e.g. 2022-03-03T08:45</p><div></div>+01<div></div>)<p></p>",
          "format": "date-time"
        },
        {
          "name": "image",
          "kind": "optional",
          "type": "string",
          "description": "Image for the Web Push message"
        },
        {
          "name": "senderAddress",
          "kind": "optional",
          "type": "string",
          "description": "Mailing sender address"
        },
        {
          "name": "clickAction",
          "kind": "optional",
          "type": "string",
          "description": "Click action for the Web Push message"
        },
        {
          "name": "pushType",
          "kind": "optional",
          "type": "string<MOBILE | WEB>",
          "description": "Push type",
          "enum": [
            "MOBILE",
            "WEB"
          ]
        },
        {
          "name": "icon",
          "kind": "optional",
          "type": "string",
          "description": "Icon for the Web Push message"
        },
        {
          "name": "predecessorNodeId",
          "kind": "optional",
          "type": "string",
          "description": "Predecessor node"
        },
        {
          "name": "successorNodeId",
          "kind": "optional",
          "type": "string",
          "description": "Successor node"
        }
      ],
      "oAuthParameters": [
        {
          "id": "Authorization",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "The mailing was updated successfully.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "RestMessageNode",
            "schema": [
              {
                "name": "nodeId",
                "kind": "optional",
                "type": "string",
                "description": "Node ID"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "description": "Mailing name"
              },
              {
                "name": "mailingId",
                "kind": "optional",
                "type": "integer<int64>",
                "description": "Mailing ID",
                "format": "int64"
              },
              {
                "name": "description",
                "kind": "optional",
                "type": "string",
                "description": "Mailing description"
              },
              {
                "name": "mediaType",
                "kind": "optional",
                "type": "string",
                "description": "Media type of the mailing"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string<invalid | activationRequired | activated | canceled | paused | running | finished>",
                "description": "Current status of the mailing",
                "enum": [
                  "invalid",
                  "activationRequired",
                  "activated",
                  "canceled",
                  "paused",
                  "running",
                  "finished"
                ]
              },
              {
                "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": "started",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "Start date of the mailing",
                "format": "date-time"
              },
              {
                "name": "finished",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "Finish date of the mailing",
                "format": "date-time"
              },
              {
                "name": "senderAddress",
                "kind": "optional",
                "type": "string",
                "description": "Email address of the sender"
              },
              {
                "name": "senderName",
                "kind": "optional",
                "type": "string",
                "description": "Sender name"
              },
              {
                "name": "replyToAddress",
                "kind": "optional",
                "type": "string",
                "description": "Email address for reply emails"
              },
              {
                "name": "replyToName",
                "kind": "optional",
                "type": "string",
                "description": "Name for reply emails"
              },
              {
                "name": "subject",
                "kind": "optional",
                "type": "map",
                "description": "",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "mediaCode",
                "kind": "optional",
                "type": "string",
                "description": "Media code of the mailing"
              },
              {
                "name": "format",
                "kind": "optional",
                "type": "string",
                "description": "Mailing format"
              },
              {
                "name": "dispatchOption",
                "kind": "optional",
                "type": "string",
                "description": "Dispatch options of the print mailing"
              },
              {
                "name": "dispatchStrategyOption",
                "kind": "optional",
                "type": "string",
                "description": "Dispatch strategy of the print mailing"
              },
              {
                "name": "accumulateMessagesForDays",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "Number of messages per day",
                "format": "int32"
              },
              {
                "name": "pushType",
                "kind": "optional",
                "type": "string<MOBILE | WEB>",
                "description": "<p>Push type (push message)</p>",
                "enum": [
                  "MOBILE",
                  "WEB"
                ]
              },
              {
                "name": "icon",
                "kind": "optional",
                "type": "string",
                "description": "<p>Icon (push message)</p>"
              },
              {
                "name": "clickAction",
                "kind": "optional",
                "type": "string",
                "description": "<p>Click action (push message)</p>"
              },
              {
                "name": "archiveEnabled",
                "kind": "optional",
                "type": "boolean",
                "description": "Is mail archiving enabled"
              },
              {
                "name": "archivePeriod",
                "kind": "optional",
                "type": "string<ONE_MONTH | TWO_MONTHS | THREE_MONTHS | SIX_MONTHS | ONE_YEAR | TWO_YEARS>",
                "description": "Mail archiving period",
                "enum": [
                  "ONE_MONTH",
                  "TWO_MONTHS",
                  "THREE_MONTHS",
                  "SIX_MONTHS",
                  "ONE_YEAR",
                  "TWO_YEARS"
                ]
              },
              {
                "name": "smsParts",
                "kind": "optional",
                "type": "integer<int32>",
                "description": "Number of SMS parts",
                "format": "int32"
              },
              {
                "name": "deeplinks",
                "kind": "optional",
                "type": "map",
                "description": "Deeplinks of the push message",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "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": "content",
                "kind": "optional",
                "type": "string",
                "description": "Mailing content"
              },
              {
                "name": "payload",
                "kind": "optional",
                "type": "map",
                "description": "Payload of the push message",
                "example": "",
                "customType": "map<string, string>",
                "schema": []
              },
              {
                "name": "contentType",
                "kind": "optional",
                "type": "object",
                "description": "Content type of the mailing",
                "example": "",
                "schema": [
                  {
                    "name": "type",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "subtype",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "parameters",
                    "kind": "optional",
                    "type": "map",
                    "description": "",
                    "example": "",
                    "customType": "map<string, string>",
                    "schema": []
                  },
                  {
                    "name": "wildcardType",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  },
                  {
                    "name": "wildcardSubtype",
                    "kind": "optional",
                    "type": "boolean",
                    "description": ""
                  }
                ]
              },
              {
                "name": "expiry",
                "kind": "optional",
                "type": "string<date-time>",
                "description": "Expiry date and time of the push message",
                "format": "date-time"
              },
              {
                "name": "attachmentIds",
                "kind": "optional",
                "type": "array",
                "description": "<p>Comma-separated list of attachment IDs</p>",
                "example": "",
                "itemType": "integer",
                "customType": "integer[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "gridLocation",
                "kind": "optional",
                "type": "object",
                "description": "Grid location point",
                "modelRef": "#/components/schemas/Point",
                "customType": "Point",
                "schema": [
                  {
                    "name": "x",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "format": "int32"
                  },
                  {
                    "name": "y",
                    "kind": "optional",
                    "type": "integer<int32>",
                    "description": "",
                    "format": "int32"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/RestMessageNode",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "ENmZPFFF9fiWBo3cZYqCP",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/message \\\n     --header 'accept: application/json'"
        },
        {
          "id": "wKyv-gygH2oc8WEZFqny9",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/x-www-form-urlencoded\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/message\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "PMUeWm48q0BzuwAaPNL88",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/message\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/x-www-form-urlencoded\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "_fI1XoiNbE39_rHWq6Ckb",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://api.campaign.episerver.net/rest/{clientId}/transactionalmail/{transactionalMailId}/message\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/x-www-form-urlencoded'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "ENmZPFFF9fiWBo3cZYqCP"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// The mailing was updated successfully.\n{\n  \"nodeId\": \"\",\n  \"name\": \"\",\n  \"mailingId\": \"\",\n  \"description\": \"\",\n  \"mediaType\": \"\",\n  \"status\": \"\",\n  \"created\": \"\",\n  \"modified\": \"\",\n  \"started\": \"\",\n  \"finished\": \"\",\n  \"senderAddress\": \"\",\n  \"senderName\": \"\",\n  \"replyToAddress\": \"\",\n  \"replyToName\": \"\",\n  \"subject\": \"\",\n  \"mediaCode\": \"\",\n  \"format\": \"\",\n  \"dispatchOption\": \"\",\n  \"dispatchStrategyOption\": \"\",\n  \"accumulateMessagesForDays\": \"\",\n  \"pushType\": \"\",\n  \"icon\": \"\",\n  \"clickAction\": \"\",\n  \"archiveEnabled\": false,\n  \"archivePeriod\": \"\",\n  \"smsParts\": \"\",\n  \"deeplinks\": \"\",\n  \"links\": [\n    {\n      \"uriBuilder\": {},\n      \"rels\": [\n        \"\"\n      ],\n      \"rel\": \"\",\n      \"type\": \"\",\n      \"params\": \"\",\n      \"title\": \"\",\n      \"uri\": \"\"\n    }\n  ],\n  \"content\": \"\",\n  \"payload\": \"\",\n  \"contentType\": {\n    \"type\": \"\",\n    \"subtype\": \"\",\n    \"parameters\": \"\",\n    \"wildcardType\": false,\n    \"wildcardSubtype\": false\n  },\n  \"expiry\": \"\",\n  \"attachmentIds\": [\n    0\n  ],\n  \"gridLocation\": {\n    \"x\": \"\",\n    \"y\": \"\"\n  }\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}