MailerUpdateTemplate¶
PUT mailer/template
Updates a template. Only the fields present in the request are changed.
Editing the content changes what the next email will say; emails already queued keep the content they were rendered with, because that is what the recipient will read.
Access Control¶
Allowed role: admin, within the brand of the caller.
Request¶
PUT https://{broker_domain}/mailer/template
{
"id": 4,
"subject": "{{name}}, we received your deposit"
}
{
"command": "MailerUpdateTemplate",
"extID": "1",
"data": {
"id": 4,
"subject": "{{name}}, we received your deposit"
}
}
const res = await platform.MailerUpdateTemplate({
id: 4,
subject: "{{name}}, we received your deposit"
});
Request Data¶
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | Yes | Template id |
name |
string | No | Template name, 1..255 characters |
description |
string | No | Free-form note |
subject |
string | No | Subject, 1..512 characters; supports placeholders |
preheader |
string | No | Line shown next to the subject in the inbox |
html |
string | No | HTML body with {{placeholders}} |
text |
string | No | Plain-text part; generated from the HTML when empty |
structure |
array | No | Email builder tree; the HTML is rendered from it |
language |
string | No | Language code, default EN |
triggerId |
int | No | Trigger that fires this template |
profileId |
int | No | Restrict the template to one provider profile |
kind |
enum | No | TRANSACTIONAL or MARKETING (default) |
status |
enum | No | ENABLED (default) or DISABLED |
Response Data¶
{
"id": 4,
"name": "Deposit confirmed",
"subject": "{{name}}, we received your deposit",
"language": "EN",
"kind": "TRANSACTIONAL",
"triggerId": 2,
"status": "ENABLED",
"updatedAt": "2026-08-24 14:31:07"
}
Errors¶
| Code | Error | Description |
|---|---|---|
400 |
VALIDATION_ERROR |
A field is out of range |
422 |
TEMPLATE_SYNTAX_UNSUPPORTED |
The content uses unsupported syntax |
404 |
NOT_FOUND |
Template, trigger, or profile not found in the brand |