Skip to main content
POST
Render a template preview

Authorizations

Authorization
string
header
required

Project-scoped secret API key (sk_…). Pass in the Authorization: Bearer <key> header. Grants access to the project the key was issued for.

Path Parameters

templateId
integer | null

Numeric template identifier.

Example:

158

Body

application/json

Variables and context used to render a template for preview, including optional CRM company context.

user
object

A user-shaped payload used as render variables. Handlebars sees this as {{user}}.

journey
object

Journey variables available as {{journey}}.

event
object

An event-shaped payload used as render variables. Handlebars sees this as {{event}}.

company
object | null

A CRM company-shaped payload used as render variables. Handlebars sees this as {{company}}.

companies
object[]

CRM company association payloads used as render variables. Handlebars sees this as {{companies}}.

context
object

Additional render context (template_id, campaign_id, custom_domain context).

Response

The compiled, channel-specific preview.

Compiled preview output. Shape varies by channel: email returns {from, subject, html, text}; SMS returns {text}; etc.