Create a transactional mail
1 min
POST
https://api.campaign.episerver.net/rest/{clientId}/transactionalmail
clientIdstringClient ID
acceptstringGenerated from available response content types
recipientListIdsarray<p>Comma-separated list of recipient list IDs</p>
contentstring<p>Mailing content (plain text)</p>
subjectstringMailing subject
senderAddressstringMailing sender address
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>
replyToNamestring<p>Reply-to mailing name (only email)</p>
resetPayloadboolean<p>If true, all payload parameters are deleted. All set parameters within this request remain (only Web Push mailings).</p>
namestringMailing name
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>
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
clickActionstringClick action for the Web Push message
pushTypestring<MOBILE | WEB>Push type
iconstringIcon for the Web Push message
201The transactional mail was created successfully.
400<p>The transactional mail could not be created. Ensure that the required parameters such as "recipientListIds", "mediaType", "subject", "senderAddress" or "content" are correctly added to the request.</p>
curl --request POST \
--url https://api.campaign.episerver.net/rest/{clientId}/transactionalmail \
--header 'accept: application/json' \
--header 'content-type: application/x-www-form-urlencoded' \
--data 'recipientListIds=array' \
--data 'content=string' \
--data 'subject=string' \
--data 'senderAddress=string'