Skip to main content
POST
Preview an email template

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.

Path Parameters

template_id
string
required

The template's id, from GET /v1/templates

Body

application/json
account_id
string | null

Their account's id, from GET /v1/objects/account/records. Needs accounts:read. Left out, the contact's own account when the key has accounts:read, and sample values when it doesn't

Maximum string length: 255
contact_id
string | null

The recipient: a contact's id, from GET /v1/objects/contact/records. Needs contacts:read

Maximum string length: 255

Response

200 - application/json

Successful Response

empty_merge_tags
string[]
required

Merge tags the HTML uses whose value is missing or blank here

html
string
required

The HTML as a send would render it; the unsubscribe link is a placeholder

samples
enum<string>[]
required

The merge-tag groups filled with sample values rather than real ones: contact unless you named one, account unless you named one or it is the named contact's (read with accounts:read), and always user (the sender)

Available options:
account,
contact,
user
subject
string | null
required

Sent as written: merge tags in a subject are not filled in