Email Templates

Update an email template

PATCH/email-templates/{id}

Changes the fields you send and returns the template. Saving content, a subject or a switch on a default template stores it and makes it customised; changes that leave a default template as it is store nothing. A custom template stays custom. subject: null leaves the subject as it is, and saving a subject without content stores the current content with it. Use POST /email-templates/{id}/actions/reset to return a template to its default. It emits email_template.updated with the changed fields, and sending the previous values undoes it. dry_run shows the result without saving it.

Path parameters

  • idstringRequired#

    The template slug, such as user_welcome. It is the template's id. A leading underscore is accepted and ignored.

Query parameters

  • dry_runboolean#

    Validate and run the call without committing it, returning what the real call would return with meta.dry_run set.

Request body

application/json, required

  • subjectstring | null#

    The subject line. Null clears it, so a system template falls back to its default subject.

  • contentstring#

    The content the template sends. It can use the placeholders listed by include=placeholders.

  • enabledboolean#

    Whether the platform sends this template. A disabled template is skipped.

  • cc_list_enabledboolean#

    Whether the recipient's CC list members are copied on this template.

  • assigned_internal_cc_enabledboolean#

    Whether the recipient's assigned internal user is copied on this template.

{
  "subject": "Welcome to {{platformName}}",
  "enabled": true
}

Responses

200

The updated email template.

EmailTemplate
{
  "data": {
    "id": "string",
    "name": "string",
    "category": "string",
    "status": "default",
    "enabled": true,
    "cc_list_enabled": true,
    "assigned_internal_cc_enabled": true,
    "subject": "string",
    "layout_mode": "fragment",
    "content": "string",
    "default_content": "string",
    "default_subject": "string",
    "placeholders": [
      {
        "value": "string",
        "label": "string"
      }
    ],
    "created_at": "2026-06-12T10:00:00+00:00",
    "updated_at": "2026-06-12T10:00:00+00:00"
  }
}
401

Authentication failed. error.code is one of invalid_token, expired, revoked.

Error
403

Authorization failed. error.code is one of org_disabled, ip_blocked, missing_scope, scope_disabled, user_disabled.

Error
404

Resource not found (error.code = not_found).

Error
422

The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per problem, or a code documented on the operation.

Error
429

Rate limit exceeded (error.code = rate_limited).

Error

Examples

curl -X PATCH https://your-org-domain/kong/core/api/v2/email-templates/{id}\
  -H "Authorization: Bearer $HELM_API_KEY"\
  -H "Content-Type: application/json"\
  -d '{
  "subject": "Welcome to {{platformName}}",
  "enabled": true
}'