Skip to content

Override one face of one email template

PUT
/email-templates/{template}/{part}

Upserts the override for (template, part). part is one of subject, text, or html.

THE BODY MUST PARSE AND MUST REFERENCE ONLY THE EVENT’S DOCUMENTED FIELDS. It is executed against a sample context with missingkey=error at save time, so a reference to a field outside the view-model is refused with 422 naming the field rather than rendering to nothing at send time — ADR 0081 §2’s fail-loud rule. The check is enforced here, not only in the admin UI, because a caller holding system.config.write can reach this endpoint directly.

Requires system.config.write.

template
required
string

The template name, e.g. admin_test.

part
required
string

Subject, text, or html.

PUT body for /email-templates/{template}/{part}. The template + part ride the path.

object
body
required

The replacement template body, in Go text/template syntax (html/template for the html part). It must reference only the event’s documented fields — a reference to anything else is refused with 422 naming the field.

string
>= 1 characters

The stored override.

object
template
required
string
Example
admin_test
part
required

Subject, text, or html.

string
body
required
string
updated_at
string format: date-time

Malformed request

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Authenticated but missing required capabilities

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Request shape is valid but the action doesn’t apply (e.g. subtitles on a non-video/audio asset).

object
error
required

Human-readable error summary

string
Example
the request could not be completed