---
title: "Create template"
method: POST
path: "/templates"
tags: ["Templates"]
---

# Create template

`POST /templates`

Creates a reusable email template from HTML or Sequenzy blocks.

## Request body

- object
  - `name` string, required
  - `subject` string, required
  - `html` string — Raw HTML body. Mutually exclusive with blocks.
  - `blocks` object[] — 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[] — Label names to assign. Missing labels are created automatically.
  - `label` string[] — Compatibility alias for labels.

## Response `200`

Template created

- object
  - `success` boolean
  - `template` object
    - `id` string
    - `name` string
    - `subject` string
    - `labels` string[]

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `500` — Template could not be created

## Changes

- **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/post.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/ba95c77d23ef/schema)
