Preview a rendered template
Renders the template’s subject and body for one contact, as they would get it, without sending or changing anything. Name a contact on your team to render for that person. Without one, a sample person and company are used: Jordan Rivera, VP of Operations at Northwind Logistics, with no custom fields. sender.* variables read the profile of the user_id member.
Returns { subject, body_html, missing_fields, unknown }. missing_fields lists the variables that were empty with no fallback, which render blank: the gaps a real send would have (in a preview, if_empty is not applied). unknown lists the tokens that are not variables, left as written in the output (except a custom.<field> your team does not have, which renders blank and is also listed in missing_fields), in the same shape as the 400 a save answers with, so a template saved before the check shows what its next edit to the subject or body must fix. It can list more than a save refuses: the preview does not search your contacts and companies for a custom.<field> your team has no field definition for, and a save does. Any team member may preview any template. A POST because the contact travels in the body; safe to retry. Counts toward the Sequencer writes rate limit, because it is a POST.
POST only because the contact travels in the body, so a retry is
safe and it takes no Idempotency-Key.
Example
Things to know
- Without
contact, the template is rendered for a sample person and company: Jordan Rivera, VP of Operations at Northwind Logistics, with no custom fields. Every{{custom.<field>}}variable therefore comes back inmissing_fields. sender.*variables read the profile of theuser_idmember, as a send reads the rep who owns the enrollment.missing_fieldslists the variables that were empty for the contact and had no fallback. They render blank here: the gaps a real send to that person would have. A preview does not applyif_empty, so it never holds anything.unknownlists every token that is not a variable, in the same shape as theunknown_variableserror a save returns. Those tokens stay insubjectandbody_htmlexactly as written, except acustom.<field>your team does not have, which renders blank and is also listed inmissing_fields. A template saved before the check can still hold one: until it is fixed, each email from it is held for the rep instead of sent.unknowncan list more than a save refuses. For acustom.<field>your team has no field definition for, a save searches your contacts and companies and accepts it when one carries the field; the preview does not search.- Any team member can preview any template. It counts toward the Sequencer writes rate limit, because it
is a
POST.
Authorizations
Team-scoped API key generated in the Salesfinity dashboard under Settings → Connections → API & Webhooks. A missing or invalid key returns HTTP 403.
Path Parameters
24-character template id.
Body
The team member this call acts as. Must be an active member of the team the API key belongs to. A 24-character hexadecimal ID.
"507f1f77bcf86cd799439011"
A contact on your team to render for (404 if not found). Without it, a sample person and company are used: Jordan Rivera, VP of Operations at Northwind Logistics, with no custom fields. A 24-character hexadecimal ID.
Response
The rendered subject and body.
The rendered subject.
The rendered HTML body. Substituted values are HTML-escaped.
Variables, as written in the template, that were empty for this contact and had no fallback. They render blank.
Tokens that are not variables, left as written in subject and body_html, in the same shape as the 400 a save answers with. It can list a custom.<field> that a save accepts, because only a save searches your records for it. Empty when every token is a variable.