---
title: "Update template"
method: PUT
path: "/templates/{templateId}"
tags: ["Templates"]
---

# Update template

`PUT /templates/{templateId}`

Updates template metadata, labels, or content. Transactional email IDs and slugs are also resolved for compatibility.

## Path parameters

- `templateId` string, required

## Request body

- object
  - `name` string
  - `subject` string
  - `previewText` string, nullable — Inbox preview text. Send null to clear it.
  - `html` string — Replacement HTML body. Mutually exclusive with blocks.
  - `blocks` object[] — Replacement Sequenzy email blocks. Mutually exclusive with html. Put visual styling under styles; top-level style keys such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.
  - `labels` string[] — Replacement label names. Send an empty array to clear labels. Missing labels are created automatically.
  - `label` string[] — Compatibility alias for labels.
  - `updates` unknown

## Response `200`

Template updated

- object
  - `success` boolean
  - `template` object
    - `id` string
    - `name` string
    - `subject` string
    - `previewText` string, nullable
    - `labels` string[]
  - `transactional` object, nullable
  - `warnings` string[] — Non-blocking advisories about the blocks that were written. The write succeeded. Present when a field was not part of the block schema and was discarded, or when a supported field does not control what its name suggests for that block type - for example styles.backgroundColor on a button colors the band behind the button while the fill comes from buttonColor. Each message names the offending path and the fields that block does accept. A sequence email step update also reports the blocks the step's existing Style > Format added back on top of the submitted blocks, because the response echoes node config rather than the stored blocks. Absent when there is nothing to report.

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `404` — Template not found
- `500` — Template could not be updated

## Changes

- **2026-08-02** `36f92fc0caa2` — 4 breaking
  - the response property `success` became optional for the status `400`
  - the response property `success` became optional for the status `401`
  - the response property `success` became optional for the status `404`
  - the response property `success` became optional for the status `500`
- **2026-07-29** `d03612b5fabd` — 1 info
  - added the optional property `warnings` to the response with the `200` status
- **2026-07-18** `6ab495dcb6ca` — 2 info
  - added the new optional request property `previewText`
  - added the optional property `template/previewText` to the response with the `200` status
- **2026-05-13** `9a89cb9ec599` — 3 info
  - added the new optional request property `label`
  - added the new optional request property `labels`
  - added the optional property `template/labels` to the response with the `200` status
- **2026-05-11** `ee7b7111c55b` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/templates/:templateId/put.md)

---

[API](https://skmtc.dev/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.dev/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/revisions/36f92fc0caa2/schema)
