Campaigns

Create campaign

Creates a campaign and linked email. Defaults to draft. Use status sent only to archive an imported/already-sent campaign; this does not send email or create delivery history. Requires a configured sender profile.

post/campaigns

Request body

namestring required
subjectstring required
trackingCodestring nullable

Optional campaign tracking code available to UTM templates as {{campaign.trackingCode}}. Empty strings are stored as null.

status'draft' | 'sent'

Initial status. Defaults to draft. Use sent only for imported/already-sent campaigns.

sentAtstring date-time nullable

ISO date-time for an imported/already-sent campaign. Only valid with status sent; defaults to now when omitted.

htmlstring

Raw HTML body. Mutually exclusive with blocks.

blocksobject[]

Sequenzy email blocks. Mutually exclusive with html. Put visual styling under styles; top-level style keys such as backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.

campaignDataobject nullable
computedListsobject[]
labelsstring[]

Label names to assign. Missing labels are created automatically.

labelstring[]

Compatibility alias for labels.

templateIdstring

Reserved for client compatibility.

segmentIdstring

Reserved for client compatibility.

Response

Campaign created

successboolean

Example response

{
  "success": true,
  "campaign": {
    "status": "draft",
    "labels": [
      "edm",
      "api"
    ],
    "url": "https://sequenzy.com/dashboard/company/comp_abc123/campaign/camp_abc123",
    "previewUrl": "https://sequenzy.com/dashboard/company/comp_abc123/campaign/camp_abc123?step=review"
  }
}

Changes