Skip to main content
POST
/
templates
/
{templateId}
/
preview
Render a template preview
curl --request POST \
  --url https://apix.spotzee.com/api/client/templates/{templateId}/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user": {},
  "event": {},
  "context": {}
}
'
{}

Documentation Index

Fetch the complete documentation index at: https://docs.spotzee.com/llms.txt

Use this file to discover all available pages before exploring further.

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.

user
object

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

event
object

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

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.

{key}
any