Create a mailing
1 min
POST
https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/messages
clientIdstringClient ID
campaignIdinteger<int64>Smart Campaign ID
acceptstringGenerated from available response content types
deepLinkNamestring<p>This parameter is deprecated. Use "payload.[name]" instead.</p>
mediaTypestring<email | sms | push><p>Media type of the mailing (required only for creation)</p>
subjectForTargetGroupstring<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>
replyToAddressstring<p>Reply-to address (only email)</p>
archiveEnabledbooleanToggle whether a mailing can be archived or not
iconMetaDatastring<p>Icon meta data. Configure "icon.[attribute]".Does not work with the "Try it out" feature.</p>
archivePeriodstring<ONE_MONTH | TWO_MONTHS | THREE_MONTHS | SIX_MONTHS | ONE_YEAR | TWO_YEARS>Period suggesting for how long a mailing should be archived
resetReplyToAddressboolean<p>If true, the local part of the reply-to address is reset</p>
resetTargetedSubjectsboolean<p>If true, all target group subjects are deleted (only email)</p>
replyToNamestring<p>Reply-to mailing name (only email)</p>
resetDeeplinksbooleanThis parameter is deprecated. Use "resetPayload" instead.
resetPayloadboolean<p>If true, all payload parameters are deleted. All set parameters within this request remain (only Web Push mailings).</p>
namestringMailing name
contentstring<p>Mailing content (plain text)</p>
payloadstring<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>
descriptionstringMailing description
senderNamestring<p>Mailing sender name (only email)</p>
subjectstringMailing subject
mediaCodestring<p>Media code (only email)</p>
expirystring<date-time><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>
imagestringImage for the Web Push message
senderAddressstringMailing sender address
clickActionstringClick action for the Web Push message
pushTypestring<MOBILE | WEB>Push type
iconstringIcon for the Web Push message
predecessorNodeIdstringPredecessor node
successorNodeIdstringSuccessor node
201The mailing was created successfully.
curl --request POST \
--url https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/messages \
--header 'accept: application/json'