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

# Create template from gallery example

`POST /templates/from-example`

## Request

- Base URL: `https://api.sequenzy.com/api/v1`
- URL: `https://api.sequenzy.com/api/v1/templates/from-example`
- Auth: HTTP bearer

Remixes a public email from the Sequenzy email gallery into a new email template for your company. The new email keeps the example's exact layout and design; AI rewrites every piece of text for your company and your logo, brand color and website links are swapped in. It is saved as an HTML template. The example brand is never named, and none of its copy, offers or claims are reused. Its legal footer is removed; your own compliant footer is added when you send. Generation usually takes 5 to 20 seconds. Nothing is saved when generation fails; every successful call creates another template. Requires `templates:write`.

## Request body

- object: Identify the example with `url`, or with `brand` and `email`. Not both.
  - `url` string: Gallery email page URL, such as `https://sequenzy.com/email-examples/brands/linear/emails/welcome-to-linear`.
  - `brand` string: Gallery brand slug. Use with `email` instead of `url`.
  - `email` string: Gallery email slug. Use with `brand` instead of `url`.
  - `brief` string: Optional direction for the new email. Takes priority over the example.
  - `name` string: Template name. Defaults to the generated subject followed by "(remix of {brand})".

## Response `200`

Template created

- object
  - `success` boolean
  - `template` object
    - `id` string
    - `name` string
    - `subject` string
    - `previewText` string, nullable
    - `isTemplate` boolean: Always true. The new email is saved as a reusable template.
  - `example` object
    - `brand` string
    - `subject` string, nullable
    - `url` string: Public gallery page of the example.
  - `message` string

## Other responses

- `400`: Missing, conflicting or invalid example reference (for example a sequence URL)
- `401`: Unauthorized
- `403`: API key lacks `templates:write`
- `404`: The example is not public (code `EXAMPLE_NOT_FOUND`), or the email gallery is not available (code `EMAIL_GALLERY_UNAVAILABLE`)
- `422`: The request body or parameters are invalid
- `500`: Generation failed. Nothing was saved, so you can retry.
- `503`: The rewrite came back incomplete (code `REMIX_FAILED`). Nothing was saved, so you can retry.

## Changes

- **2026-10-16** `db3873ca3d4d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/templates/from-example/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.dev/sequenzy/apis/sequenzy-api/revisions/3d816357b738?raw)
