Campaigns

Create campaign

Creates a campaign and linked email from at most one of prompt, HTML, Sequenzy blocks, or an existing template. Omit all content sources to create an empty draft. Optional From/Reply-To inputs create or select profiles; From addresses require a verified sending domain. Defaults to draft. Use status sent only to archive an imported/already-sent campaign.

post/campaigns

Request body

namestring required
subjectstring

Required with HTML, blocks, or templateId; optional with prompt, where it overrides the generated subject.

previewTextstring nullable

Optional inbox preview text saved on the linked email.

preheaderTextstring nullable

Compatibility alias for previewText.

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.

promptstring

Natural-language request for branded native campaign blocks.

stylestring

Generation style; valid only with prompt.

tonestring

Generation tone; valid only with prompt.

campaignDataobject nullable
computedListsobject[]
labelsstring[]

Label names to assign. Missing labels are created automatically.

labelstring[]

Compatibility alias for labels.

templateIdstring

Company-owned email template to copy into the campaign. Mutually exclusive with prompt, HTML, and blocks.

segmentIdstring

Shorthand for targeting one saved segment. Equivalent to targetLists {"type":"segment","segmentId":"seg_123"}. Mutually exclusive with targetLists.

targetListsobject

Campaign audience saved on the draft. Omit to leave targeting unset and choose it when scheduling. Examples: {"type":"all"}, {"type":"lists","listIds":["list_123"]}, {"type":"segment","segmentId":"seg_123"}, {"type":"filtered","filters":[],"filterJoinOperator":"and"}, {"type":"rules","include":[],"exclude":[]}. Mutually exclusive with segmentId.

fromEmailstring email

Campaign From address. Its domain must be configured and verified.

fromNamestring

Display name for a newly created sender profile. Requires fromEmail.

senderProfileIdstring

Existing sender profile ID. Mutually exclusive with fromEmail.

replyTostring email

Campaign Reply-To address. A reply profile is created when needed.

replyToNamestring

Display name for a newly created reply profile. Requires replyTo.

replyProfileIdstring

Existing reply profile ID. Mutually exclusive with replyTo.

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