Reference / Settings

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 /v1/applications/{id}/templates/preview
Secret API key operationId: preview

Authorization

Server-to-server. Send a secret key as a Bearer token plus the x-application-id header.

Path parameters

  • id string<uuid> required

    Application id

Request body · required

  • body string

    Draft HTML body fragment (for an unsaved override). Empty/absent → renders the built-in default.

  • channel string required
  • locale string

    Locale to render (drives RTL + text direction). Defaults to the app's default locale.

  • subject string

    Draft subject (for an unsaved override). Ignored when `body` is empty.

  • template string 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 request
POST https://api.identrahq.com/v1/applications/018f3c4a-7b2e-7c1d-9e0a-1f2b3c4d5e6f/templates/preview

Path parameters

Request body

application/json