Skip to content

Update transactional campaign

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

HTTP method: PATCH

https://api.sender.net/v2/transactional/{id}


ParameterTypeDescription
idstring requiredID of the transactional campaign to update.
titlestringOptional updated title for the campaign.
subjectstringOptional updated subject line for the campaign.
fromstringOptional updated sender name.
reply_tostringOptional updated reply-to email. Must belong to a valid verified domain.
editorstringThe value must be one of “plain”, “html”, or “builder”.
last_actionstringThe current progress step or status of the campaign editor.
preheaderstringOptional preview text displayed in inboxes.

const url = new URL("https://api.sender.net/v2/transactional/{id}");
let headers = {
"Authorization": "Bearer [your-token]",
"Content-Type": "application/json",
"Accept": "application/json",
};
let bodyContent = {
"title": "Transactional campaign test title change",
"subject": "Transactional campaign test subject change",
"from": "Sender support",
"reply_to": "[email protected]",
"editor": "plain",
"preheader": "Preview changed text of my transactional campaign"
};
fetch(url, {
method: "PATCH",
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 change",
"subject": "Transactional campaign test subject change",
"from": "Sender support",
"reply_to": "[email protected]",
"domain_id": "bkRz2N",
"created": "2025-07-24 21:09:28",
"modified": "2025-07-24 21:33:30",
"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
}
}