Campaigns

Render campaign HTML

Changed on

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

Request

  • Base URL
    https://api.sequenzy.com/api/v1
  • URL
    https://api.sequenzy.com/api/v1/campaigns/{campaignId}/render
  • Auth
    HTTP bearer

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. Required for sequence steps whose nodeType is action_ab_test; those steps have no email of their own. Sequence variants also need the ab_tests:read scope. Ignored for templates.

variationIdstring

Render a design variation of the campaign's or step's email in place of its saved content, from List Campaign Variations or List Sequence Email Variations. It must be ready; it can't be combined with variantId. 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",
  "variationId": "evar_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"
    }
  ],
  "unevaluatedConditions": [
    {
      "field": "tag",
      "operator": "contains",
      "value": "extended",
      "description": "Tag contains extended"
    }
  ]
}

Changes

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • breaking

      the request property / became not nullable

    • breaking

      the request property / became not nullable