Skip to main content
POST
/
api
/
email
/
preview
Preview email content with resolved dynamic fields
curl --request POST \
  --url https://api.exante.app/api/email/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "body": "<string>",
  "context_type": "invoice",
  "subject": "<string>",
  "context_uid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "preview_mode": "live"
}
'
{
  "body": "<string>",
  "preview_mode": "live",
  "errors": [
    {
      "token": "{shipping_address}",
      "message": "Token '{shipping_address}' is not available for context_type 'invoice'."
    }
  ],
  "subject": "<string>"
}
Use preview_mode: "live" to resolve with real context data (requires context_uid). Use preview_mode: "sample" to resolve with sample provider data when no real context is available.

Authorizations

Authorization
string
header
required

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

Body

application/json
body
string
required
context_type
string
required
Example:

"invoice"

subject
string
context_uid
string<uuid>

Context object UID. Required when preview_mode is 'live', optional when preview_mode is 'sample'.

preview_mode
enum<string>
default:live

Preview mode. 'live' resolves against a real context object, 'sample' uses provider sample data.

Available options:
live,
sample

Response

Resolved email preview

body
string
required
preview_mode
enum<string>
required
Available options:
live,
sample
errors
object[]
required
subject
string