Email Templates

Update an email template

Changed on

Updates one or more fields of the specified email template and returns the updated template.

patch/email_templates/{id}

Request

  • Base URL
    https://api.telnyx.com/v2
  • URL
    https://api.telnyx.com/v2/email_templates/{id}
  • Auth
    HTTP bearer

Path parameters

idstring uuid required

Email template UUID.

Request body

namestring
subjectstring nullable

Liquid template subject.

html_bodystring nullable

Liquid template HTML body.

text_bodystring nullable

Liquid template text body.

variablesstring[] nullable

Persisted variable names. In automatic mode a non-null array is rejected; in explicit mode this is the exact manual array and each item is limited to 255 Unicode code points.

variables_mode'automatic' | 'explicit'

Controls how variables is maintained. Setting automatic re-extracts immediately from the effective subject, HTML body, and text body and rejects a simultaneous non-null array. Setting explicit requires the exact non-null array, including valid []. With the mode omitted, a non-null array selects explicit mode, null selects automatic mode, and omitting both fields preserves the current mode. Source-content changes re-extract only in automatic mode.

strict_variablesboolean

Per-template strict variable-validation setting.

autoescapeboolean

Per-template HTML autoescaping setting.

variable_schemaobject nullable

Structured variable requirements. Required variables cannot define defaults; invalid combinations return 422. Set to null to clear the schema.

Response

Template updated.

Changes