---
title: "Preview email template"
method: POST
path: "/api/v1/email-templates/{templateId}/preview"
tags: ["Email templates"]
---

# Preview email template

`POST /api/v1/email-templates/{templateId}/preview`

## Request

- Base URL: `https://www.useboom.ai`
- URL: `https://www.useboom.ai/api/v1/email-templates/{templateId}/preview`
- Auth: HTTP bearer

Render an email template with real data and read back the subject, HTML and text a recipient would get. Pick a stored event (eventId, eventExternalId, or latestEventName [+ personExternalId]) and its properties fill event.* and engagement.workflowState.*, exactly as in a journey triggered by that event, including inside Liquid tags ({% if event.amount > 0 %}, {% for i in event.items %}). When the event names a person, customer.* and person.* come from that person, with fields the organization marked sensitive hidden. Without an event, sample values are used. `unresolved` lists the paths of variables that rendered blank, `liquidError` is set when the Liquid failed, and `redactedKeys` lists event fields hidden because the organization marked them sensitive (always hidden to an assistant). Read-only: nothing is sent; use it to check a template before publishing or before a journey sends it.

## Path parameters

- `templateId` string, required: Email template id.

## Request body

- object
  - `eventId` string: Boom's id for the event (cdp_events_list / cdp_events_get).
  - `eventExternalId` string: The id your own backend sent the event with.
  - `latestEventName` string: Use the most recent event with this name, e.g. "payment_due". Narrow it to one person with personExternalId.
  - `personExternalId` string: With latestEventName: that person's most recent event.
  - `values` object: path -> text to use instead of the event or sample value, e.g. { "customer.name": "Brian" }.
  - `bindings` object: A journey Send email step's rebindings (variable key -> path), to preview the email as that step sends it.

## Response `200`

Success

- object
  - `subject` string, required
  - `html` string, required
  - `text` string, nullable, required
  - `unresolved` string[], required: Variables that rendered blank and had no fallback.
  - `liquidError` string, nullable, required: Set when the Liquid failed and the output is a fallback.
  - `redactedKeys` string[], required: Event fields masked as sensitive.
  - `event` object, nullable, required: The event the preview used; null when it used samples.
    - `id` string, required
    - `externalId` string, required
    - `name` string, required
    - `timestamp` string, required: ISO timestamp.
    - `personExternalId` string, nullable, required

## Other responses

- `400`: Validation failed or the request cannot proceed.
- `401`: Missing, malformed, or revoked API key.
- `404`: The resource does not exist in this organization.
- `409`: Conflicts with the current state (duplicates, wrong lifecycle state).
- `422`: The request is well-formed but semantically invalid.
- `429`: Rate limit exceeded — retry after `Retry-After`.
- `500`: Internal server error.
- `503`: Transient error — retry with a narrower request.

## Changes

- **2026-11-03** `7c7a773b12ce`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/useboom/apis/boom-api/changes/api/v1/email-templates/:templateId/preview/post.md)

---

[API](https://skmtc.dev/useboom/apis/boom-api.md) - [All operations](https://skmtc.dev/useboom/apis/boom-api/llms.txt) - [OpenAPI document](https://skmtc.dev/useboom/apis/boom-api/revisions/d596d92ed092?raw)
