Campaigns

Preview a campaign email

Renders draft email content using the selected contact's fields and declared templateData fallbacks.

POST
/v1/campaigns/preview

Renders draft email content using the selected contact's fields and declared templateData fallbacks. Creates no campaign run or message. Omit contactId to preview the fallback data alone.

x-api-key<token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

content*
audience*
contactId?|null

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/campaigns/preview" \  -H "Content-Type: application/json" \  -d '{    "content": {      "channel": "email",      "email": {}    },    "audience": {      "topicId": "string"    }  }'
{  "subject": "string",  "preheader": "string",  "html": "string",  "text": "string"}

Related documentation