Preview an email theme
/email-themes/{id}/actions/previewRenders a sample system email in the theme and returns { "data": { "html" } }, using the platform organisation's branding. The body can pick which system template is the sample. It only reads, sends no email and emits no webhook, so there is nothing to undo. Use POST /email-templates/{id}/actions/preview to preview one template's content, and PATCH /settings/email-theme to choose the theme in use. Returns 404 for an unknown theme, and also when the platform host has no brand colours to render with.
Path parameters
The theme id, such as family-office. Use GET /email-themes to list them.
Headers
Makes a retry safe. Send a new UUID for each new request and reuse it only to retry that request; the first response is replayed for 24 hours.
Request body
application/json, optional
The system email template to use as the sample body, such as user_welcome or new_deal_published. It must be one of the platform's system template names; a custom template is not accepted. Defaults to generic_notification.
{
"template": "user_welcome"
}Responses
The rendered sample email.
{
"data": {
"html": "<html>...rendered email...</html>"
}
}Authorization failed. error.code is one of org_disabled,
ip_blocked, missing_scope, scope_disabled, user_disabled.
The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per
problem, or a code documented on the operation.
Examples
curl -X POST https://your-org-domain/kong/core/api/v2/email-themes/{id}/actions/preview\
-H "Authorization: Bearer $HELM_API_KEY"\
-H "Content-Type: application/json"\
-d '{
"template": "user_welcome"
}'