v97

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-04231129815.9 KB
Campaigns

Render campaign HTML

Render a campaign to the exact email-safe HTML that would be sent, for embedding a visual preview. Read-only: this never sends or modifies anything, and uses POST only so personalization input can travel in a request body.

post/campaigns/{campaignId}/render

Path parameters

campaignIdstring required

Campaign ID

Request body

subscriberIdstring

Personalize as this stored subscriber. Mutually exclusive with subscriber. The rendered HTML then carries that subscriber's details, so this field additionally requires the subscribers:read scope.

variablesobject

Extra merge variables layered over the contact's attributes.

localestring

Force a localization locale instead of deriving it from the contact.

variantIdstring

Render a specific A/B test variant. Ignored for templates.

trackingboolean

Apply the company's auto-UTM link decoration as a real send would. Per-send click redirects and the open pixel need a real email send record and are never present in a render.

Example request

{
  "subscriberId": "sub_abc123",
  "locale": "es",
  "variantId": "var_abc123"
}

Response

Email rendered successfully

successboolean required
htmlstring required

Email-safe HTML document, rendered exactly as it would be sent.

subjectstring required

Subject line with merge tags resolved.

previewTextstring nullable required

Inbox preview text with merge tags resolved.

localestring required

Localization locale the render resolved to.

personalizedboolean required

False means no contact was supplied, so a sample contact was used and contact-specific merge tags resolved to empty values.

trackingAppliedboolean required

Whether auto-UTM link decoration was applied.

Example response

{
  "success": true,
  "locale": "en",
  "unresolvedMergeTags": [
    {
      "tag": "discountCode"
    }
  ]
}