Skip to content

Preview Campaign Email

Render a subject and body with spin syntax and merge tags filled in.

POST/api/v1/campaigns/{campaign_id}/preview

Requires an API key with the read scope.

Nothing is sent and nothing is stored. Spin syntax like {Hi|Hello} is resolved to one choice and merge tags like {{firstName}} are filled from the lead you name, or from sample data (John Doe, Acme Inc., Marketing Manager) when you omit leadId or the lead is not in this workspace. Three sample variations of the subject and of the body are returned as well.

Path Parameters#

campaign_idstringpathrequired
The campaign.

Request Body#

subjectstringbodyrequired
Subject template, up to 500 characters.
bodystringbodyrequired
Body template, up to 200,000 characters.
leadIdstringbody
Fill merge tags from this lead.

Response#

dataobject
Show Preview
subjectstring
The rendered subject.
bodystring
The rendered body.
subjectVariationsstring[]
Three other renderings of the subject.
bodyVariationsstring[]
Three other renderings of the body.

Errors#

StatusDescription
401Missing, invalid, revoked or expired API key
403API key does not have the required scope: read
404Campaign not found in this workspace

Rate Limit#

  • 300 requests per minute, shared by every read call in your workspace. Fixed 60-second window.
  • Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (unix epoch seconds) and X-RateLimit-Bucket (read).
  • A 429 response includes a Retry-After header (seconds until the bucket resets).

For client-side patterns (Retry-After, exponential backoff, monitoring X-RateLimit-Remaining), see Rate Limiting.

Was this page helpful?
View as MarkdownLast updated November 4, 2026