Menu

Preview campaign content

POST/v1/campaigns/{id}/preview

Requires an API key with the campaigns:read scope. About keys and scopes

Renders the campaign content to HTML and plain text without sending anything, optionally against a specific contact so personalization tokens resolve. Use this to check a campaign before sending it.

Path parameters

idstringrequired

uuid

Request body

contactIdstringrequired

The contact whose values fill the merge tags.

uuid

Returns

Returns 200 OK with a CampaignEmailPreview in data. Otherwise returns an error; Errors lists every code and which to retry.

subjectstringrequired

The subject with merge tags filled in.

htmlstringrequired

The rendered HTML body.

textstringoptional

The rendered plain-text body.