Broadcasts

Preview a broadcast

Changed on

Renders the email campaign exactly as contact_id would receive it (subject, preview line and the full HTML in the account's layout) without sending anything. Nothing is recorded: no delivery, no stats, no enrollment. The unsubscribe link in it is a placeholder that unsubscribes nobody. A draft or scheduled broadcast renders from its current content; one that is sending or sent renders from the snapshot that went out. Broadcasts use only live variables, so data_source is contact (or none).

post/broadcasts/{id}/preview

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Path parameters

id, string required

The broadcast's prefixed id (e.g. bcst_abc123).

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

EmailPreviewRequest required
contact_id, string

Render as this contact (con_...). Omit to use every variable's default.

Response

The rendered email

EmailPreview required

An email rendered for one contact exactly as they would receive it, without sending it.

object, 'email_preview' required
subject, string required

The subject with its variables filled in.

preview_text, string required

The inbox preview line with its variables filled in, or empty.

html, string required

The whole email, layout included. Its unsubscribe link is a placeholder that unsubscribes nobody.

data_source, 'none' | 'contact' | 'enrollment' | 'latest_order' | 'no_order' required

Whose data filled the variables: none (no contact_id, so every variable uses its default), contact (their details as they are now), enrollment (a sequence step for someone enrolled: what they joined with), latest_order (not enrolled, so product and order variables come from their latest order) or no_order (not enrolled and no order, so those variables are blank).

Changes

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    3 more changes in this revision