Skip to main content
PUT
JavaScript

Authorizations

Authorization
string
header
required

Telnyx API key supplied as Authorization: Bearer <token>. In production, auth may be validated by the API gateway and forwarded via Telnyx auth headers.

Path Parameters

id
string<uuid>
required

Email template UUID.

Body

application/json
name
string
Maximum string length: 255
Pattern: ^[A-Za-z0-9 _-]+$
subject
string | null

Liquid template subject.

Maximum string length: 255
html_body
string | null

Liquid template HTML body.

text_body
string | null

Liquid template text body.

variables
string[] | null

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.

Maximum string length: 255
variables_mode
enum<string>

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.

Available options:
automatic,
explicit
strict_variables
boolean

Per-template strict variable-validation setting.

autoescape
boolean

Per-template HTML autoescaping setting.

variable_schema
object | null

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

Response

Template updated.

data
object
required