---
title: "Update an email template"
method: PATCH
path: "/email_templates/{id}"
tags: ["Email Templates"]
---

# Update an email template

`PATCH /email_templates/{id}`

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

## Path parameters

- `id` string, uuid, required

## Request body

- UpdateEmailTemplateRequest
  - `name` string
  - `subject` string, nullable — Liquid template subject.
  - `html_body` string, nullable — Liquid template HTML body.
  - `text_body` string, nullable — Liquid template text body.
  - `variables` string[]
  - `strict_variables` boolean — Per-template strict variable-validation setting.
  - `autoescape` boolean — Per-template HTML autoescaping setting.
  - `variable_schema` object, nullable — Structured variable requirements. Required variables cannot define defaults; invalid combinations return 422. Set to `null` to clear the schema.

## Response `200`

Template updated.

- EmailTemplateResponse
  - `data` EmailTemplate, required
    - `record_type` 'email_template', required
    - `id` string, uuid, required
    - `name` string, required
    - `subject` string, nullable, required
    - `html_body` string, nullable, required
    - `text_body` string, nullable, required
    - `variables` string[], required — Legacy unstructured variable names. This path remains supported unchanged.
    - `strict_variables` boolean, required — Whether strict variable validation is enabled for this template. When `true`, sends and renders that are missing a variable marked `required: true` in `variable_schema` fail with 422 naming the variable.
    - `autoescape` boolean, required — Whether HTML autoescaping is enabled for this template. When `true`, only rendered `html_body` expression output is HTML-escaped at the output boundary; `subject` and `text_body` are never autoescaped.
    - `variable_schema` object, nullable, required — Structured variable requirements, or `null` when the template uses only the legacy `variables` array.
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `401` — Not authorized (10006).
- `404` — Resource not found (10001).
- `422` — Validation Failed (10015) or changeset validation error.

## Changes

> 93 revisions in range; 1 not diffed.

- **2026-09-23** `16bfa298dc71` — 6 info
  - added the new optional request property `autoescape`
  - added the new optional request property `strict_variables`
  - added the new optional request property `variable_schema`
  - added the required property `data/autoescape` to the response with the `200` status
  - …2 more
- **2026-09-22** `9621f6123ebc` — 6 warning
  - added the new `10011` enum value to the `errors/items/code` response property for the response status `401`
  - added the new `10011` enum value to the `errors/items/code` response property for the response status `404`
  - added the new `10011` enum value to the `errors/items/code` response property for the response status `422`
  - added the new `domain_graduation_limit_exceeded` enum value to the `errors/items/code` response property for the response status `401`
  - …2 more
- **2026-07-16** `2fb3b617430a` — 6 warning, 3 info
  - added the new `recipient_suppressed` enum value to the `errors/items/code` response property for the response status `401`
  - added the new `recipient_suppressed` enum value to the `errors/items/code` response property for the response status `404`
  - added the new `recipient_suppressed` enum value to the `errors/items/code` response property for the response status `422`
  - added the new `reputation_suspended` enum value to the `errors/items/code` response property for the response status `401`
  - …5 more
- …earlier changes not shown

[Full history](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/changes/email_templates/:id/patch.md)

---

[API](https://skmtc.dev/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/revisions/88481995b4ca?raw)
