render a template (built-in or an unsaved draft) with the app's branding + sample values. HTML is layout-wrapped and, for a draft body, sanitized — exactly what the delivery path produces, so the preview can't drift from what's sent.
POST
Secret API key operationId: preview/v1/applications/{id}/templates/preview Authorization
Server-to-server. Send a secret key as a Bearer token plus the x-application-id header.
Path parameters
idstring<uuid> requiredApplication id
Request body · required
bodystringDraft HTML body fragment (for an unsaved override). Empty/absent → renders the built-in default.
channelstring requiredlocalestringLocale to render (drives RTL + text direction). Defaults to the app's default locale.
subjectstringDraft subject (for an unsaved override). Ignored when `body` is empty.
templatestring required
Responses
200 Rendered preview
{
"data": {
"html": "string",
"subject": "string",
"text": "string"
},
"error": {
"code": "string",
"message": "string"
},
"meta": {
"timestamp": "string"
},
"success": false
}Request
curl -X POST "https://api.identrahq.com/v1/applications/018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f/templates/preview" \
-H "Content-Type: application/json" \
-d '{
"body": "string",
"channel": "string",
"locale": "string",
"subject": "string",
"template": "string"
}'Try it
live requestPOST
https://api.identrahq.com/v1/applications/018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f/templates/preview