Skip to main content
TemplatesVersion: v3New

Preview Email Template

POST/emails/locations/{locationId}/templates/{templateId}/preview

Return the saved rendered HTML, subject and preview text of this template exactly as saved, with the merge fields ({{...}}) it still contains. Sends no email; merge fields are filled in per contact at send time.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:emails/templates.readonly
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Versionstringrequired

API Version

Available optionsv3
Example:v3

Path Parameters

locationIdstringrequired

Location ID

Example:ve9EPM428h8vShlRW1KT
templateIdstringrequired

Template ID

Example:507f1f77bcf86cd799439011

Response

Success

htmlstringrequired

Stored rendered HTML, exactly as saved.

Example:<html><body><p>Hello {{contact.first_name}}</p></body></html>
subjectstringrequired

Stored subject. Empty if no subject was saved.

Example:Holiday sale starts now
previewTextstring

Stored inbox preview text.

Example:Our biggest offer of the year
unresolvedMergeFieldsstring[]required

Distinct {{...}} tokens remaining in HTML, subject or preview text after rendering. These may require send-time context.

Example:["{{contact.first_name}}"]