Skip to main content
POST
Create Campaign
Create a campaign and linked email with at most one content source: prompt for Sequenzy-generated branded native blocks, blocks for finished caller-supplied content, html for preserved/imported markup, or templateId to copy an existing company template. Omit all four to create an empty draft for later editing. style and tone are valid only with prompt; subject and preview values may override generated values. You may select or create campaign-specific From and Reply-To profiles; otherwise account defaults apply. Campaigns are drafts by default. For migrations, status: "sent" archives an already-sent campaign without sending. The response includes emailId, the created email body; it appears in List Templates and can be reused as templateId for later campaigns.

Request

string
required
Campaign name.
string
Email subject line. Required with html, blocks, or templateId; optional with prompt, where it overrides the generated subject.
string
Natural-language request for Sequenzy to generate branded native campaign blocks. Use this instead of html, blocks, or templateId.
string
Optional generation style. Valid only with prompt.
string
Optional generation tone. Valid only with prompt.
string
Optional inbox preview text saved on the linked email.
string
Alias for previewText. Provide only one of previewText or preheaderText.
string
Optional campaign tracking code available to UTM templates as {{campaign.trackingCode}}. Empty strings are stored as null.
string
Initial status. Use draft or sent; defaults to draft. sent is for imported/already-sent campaigns only.
string
ISO date-time for an imported/already-sent campaign. Only valid with status: "sent"; defaults to the current time when omitted.
string
Raw HTML body. Sequenzy converts this into email blocks. Use this or blocks, not both.
array
Sequenzy email blocks. Use this or html, not both. Put block styling under styles; top-level style keys like backgroundColor, backgroundOpacity, borderColor, borderWidth, and borderRadius are normalized into styles.
string
Company-owned email template to copy into the campaign. Use this instead of prompt, html, or blocks.
array
Label names to assign to the campaign. Missing labels are created automatically. The API also accepts label as a compatibility alias.
object
Campaign audience saved on the draft, for example {"type": "lists", "listIds": ["list_123"]} to send straight to a list. Also accepts {"type": "all"}, {"type": "segment", "segmentId": "seg_123"}, {"type": "filtered", ...}, and {"type": "rules", ...}. Omit it to leave targeting unset and set the audience later with update or schedule. Mutually exclusive with segmentId.
string
Shorthand for targeting one saved segment, equivalent to {"type": "segment", "segmentId": "seg_123"}. Mutually exclusive with targetLists.
object
Campaign-scoped JSON data available while rendering this campaign.
array
Personalized list definitions computed from campaignData.
string
Campaign From address. Its domain must be configured and verified. Mutually exclusive with senderProfileId.
string
Display name recipients see, e.g. Brennon at TradeTally. Selects the sender identity of that name on fromEmail, creating it when the address has no identity by that name; the mailbox’s other display names, and everything pinned to them, are untouched. Requires fromEmail; omit it when you send senderProfileId, which already carries its own display name.
string
Existing sender profile ID. It already supplies both the From address and the display name, so send it on its own and omit fromEmail and fromName.
string
Campaign Reply-To address. Mutually exclusive with replyProfileId.
string
Display name for the Reply-To address. Requires replyTo; omit it when you send replyProfileId, which already carries its own display name. An address carries one Reply-To name company-wide: if replyTo already has a saved profile under a different name, that saved name is kept and the response warnings array says so.
string
Existing reply profile ID. It already supplies both the Reply-To address and the display name, so send it on its own and omit replyTo and replyToName.

Responses