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

# Preview template from gallery example

`POST /templates/from-example/preview`

## Request

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

Rewrites a public email from the Sequenzy email gallery for your brand, or for another `website`, and returns it without saving anything. Same rewrite as Create Template from Example. Usually takes 5 to 20 seconds. Requires `templates:write`.

## Request body

- object: Identify the example with `url`, or with `brand` and `email`. Not both.
  - `url` string: Gallery email page URL, or a sequence page URL ending in `#email-{email}`.
  - `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 email. Takes priority over the example.
  - `website` string: Optional site or domain, such as `acme.com`, to write the preview for instead of your own brand. Its registrable domain is looked up like the public gallery preview. Omit it to use your company's brand profile.

## Response `200`

Preview written. Nothing was saved.

- object
  - `success` boolean
  - `preview` object
    - `brandName` string: The brand it is written for.
    - `website` string, nullable: The normalized `website` it was written for, or `null` for your own brand.
    - `subject` string
    - `previewText` string
    - `html` string: The rewritten email as HTML.
  - `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, or a malformed `website`
- `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. You can retry.
- `503`: The rewrite came back incomplete (code `REMIX_FAILED`). Nothing is saved by a preview, 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/preview/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/8156dc12d8b4?raw)
