MailerDeleteTemplate¶
DELETE mailer/template
Deletes a template. Emails sent from it keep their rendered content and the templateId
reference, so history and reports stay readable.
A trigger left without an enabled template simply stops producing emails — check MailerGetTriggers after deleting the last template of a trigger.
Access Control¶
Allowed role: admin, within the brand of the caller.
Request¶
DELETE request
DELETE https://{broker_domain}/mailer/template?id=9
Authorization: <JWT_TOKEN>
{
"command": "MailerDeleteTemplate",
"extID": "1",
"data": {
"id": 9
}
}
const res = await platform.MailerDeleteTemplate({
id: 9
});
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | Yes | Template id |
Response Data¶
{
"id": 9,
"deleted": true,
"message": "Template with ID 9 has been deleted"
}
Errors¶
| Code | Error | Description |
|---|---|---|
404 |
NOT_FOUND |
Template not found in the brand |