POST/forms/{formId}/templates/{kind}/preview

Preview a form's email template

Previews a form's email template without sending an email. Use kind to choose the notification or autoresponder template, and optionally provide data to render the template with specific submission values. If you omit data, the preview uses example data derived from the form's recent submissions.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 1 body field
formIdstringrequired
The identifier of the form whose template you want to preview. Must contain at least one character.
kindstringrequired
The template type to preview: `notification` or `autoresponder`.
Allowed:notificationautoresponder

Optional preview data for rendering the template. If omitted, the preview uses example data derived from the form's recent submissions.

dataobjectoptional
Stand-in submission data to render against. Defaults to example data derived from the form's own recent submissions.

8 status codes
200Returns the rendered template as HTML and plain text, along with the rendered subject or `null` when the email uses the default subject.
htmlstringrequired
subjectstringrequired
The rendered subject line, or null when the template has none and the email uses the default subject.
textstringrequired
400Returned when the request is malformed or fails validation.
codestringrequired
detailstringrequired
statusnumberrequired
titlestringrequired
typestringrequired
401Returned when the token is missing, malformed, revoked, or expired.
codestringrequired
detailstringrequired
statusnumberrequired
titlestringrequired
typestringrequired
403Returned when the token lacks the required scope, the workspace is not upgraded, or a limit has been reached.
codestringrequired
detailstringrequired
statusnumberrequired
titlestringrequired
typestringrequired
404Returned when the requested resource does not exist.
codestringrequired
detailstringrequired
statusnumberrequired
titlestringrequired
typestringrequired
429Returned when the caller is rate limited and should retry later.
codestringrequired
detailstringrequired
statusnumberrequired
titlestringrequired
typestringrequired
500Returned when something goes wrong on the service's end.
codestringrequired
detailstringrequired
statusnumberrequired
titlestringrequired
typestringrequired
503Returned when the template service is unavailable; retry shortly.
codestringrequired
detailstringrequired
statusnumberrequired
titlestringrequired
typestringrequired

Error handling

A 400 is returned for malformed requests or validation failures; a 401 is returned when the token is missing, malformed, revoked, or expired; a 403 is returned when the token lacks the required scope, the workspace is not upgraded, or a limit is reached; and a 404 is returned when the resource does not exist. A 429 means the caller is rate limited, a 500 indicates an error on the service's end, and a 503 means the template service is unavailable. The formId path parameter must contain at least one character, and the kind path parameter must be notification or autoresponder. The optional data field accepts an object of stand-in submission values.