Skip to content

Create transactional campaign

Use this API method to create a new transactional campaign.
Only plain and html editors are supported via API. For builder campaigns, use the interface.

HTTP method: POST

https://api.sender.net/v2/transactional


ParameterTypeDescription
titlestringName of the campaign (optional, shown in reports)
subjectstring requiredSubject line of the campaign
fromstring requiredSender name displayed to recipients
reply_tostring requiredSender email. Must belong to a verified domain
editorstring requiredThe value must be one of “plain”, “html”, or “builder”.
preheaderstringPreview text of the email
contentstringProvide the content of your campaign. Only plain text and html options are available for providing campaign content using the API. For drag&drop builder you need to use the interface.

const url = new URL("https://api.sender.net/v2/transactional");
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let bodyContent = {
"title": "Transactional campaign test title",
"subject": "Transactional campaign test subject",
"from": "Sender support",
"reply_to": "[email protected]",
"editor": "plain",
"preheader": "Preview text of my transactional campaign",
"content": "Adding the first content of my campaign"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(bodyContent)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Example Response
{
"data": {
"id": "ep2W4y",
"user_id": "b2zzjb",
"account_id": "boEyke",
"title": "Transactional campaign test title",
"subject": "Transactional campaign test subject",
"from": "Sender support",
"reply_to": "[email protected]",
"domain_id": "bkRz2N",
"created": "2025-07-24 21:09:28",
"modified": "2025-07-24 21:09:28",
"type": "API",
"last_action": "step1",
"editor": "plain",
"html": {
"id": "dBKJRx",
"thumbnail_url": "https://cdn.sender.net/thumbnails/boEyke/html/dBKJRx.webp?v=1753369768",
"has_preview": false,
"has_snapshots": false,
"styles": null
},
"purchaseCount": 0
}
}