Skip to content

Operator-authored email templates

GET
/email-templates

Every email the instance can send, each with its shipped body, any operator override, and the finite set of fields available to a template for that event (#795, ADR 0081 §2 as amended).

Requires system.config.read. Unlike site text this is NOT anonymous: the shipped mail bodies are an operator concern, not UI wording a logged-out visitor already sees.

The template catalogue.

Every email an instance can send, each with its shipped text, any operator override, and the finite set of fields available to a template for that event (#795, ADR 0081 §2). The editor needs all three: the shipped body to show alongside, the override to edit, and the field list so an operator does not have to guess what is in scope.

object
templates
required
Array<object>
object
name
required

The stable template name, e.g. admin_test.

string
Example
admin_test
description
required

Plain-word summary of when this mail is sent.

string
parts
required

The faces of this template — subject, text, and (when it has one) html.

Array<object>
object
part
required

Subject, text, or html.

string
shipped
required

The body this face ships with, from the embedded binary.

string
overridden
required

True when an operator override replaces the shipped body.

boolean
body

The operator override, present only when overridden.

string
updated_at
string format: date-time
fields
required

The documented view-model for one event — the ONLY fields a template may reference. This set is the security boundary: a template naming anything outside it is refused at save.

object
scalars
required
Array<object>
object
name
required
string
Example
site_name
kind
required

String or number.

string
description
required
string
collections
required

Repeated groups an operator loops over with {{range .name}}…{{end}}; each row exposes its own fields.

Array<object>
object
name
required
string
Example
hits
description
required
string
fields
required
Array<object>
object
name
required
string
Example
site_name
kind
required

String or number.

string
description
required
string

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