---
title: "Create campaign"
method: POST
path: "/campaigns"
tags: ["Campaigns"]
---

# Create campaign

`POST /campaigns`

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.

## Request body

- object
  - `name` string, required
  - `subject` string — Required with HTML, blocks, or templateId; optional with prompt, where it overrides the generated subject.
  - `previewText` string, nullable — Optional inbox preview text saved on the linked email.
  - `preheaderText` string, nullable — Compatibility alias for previewText.
  - `trackingCode` string, 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.
  - `sentAt` string, date-time, nullable — ISO date-time for an imported/already-sent campaign. Only valid with status sent; defaults to now when omitted.
  - `html` string — Raw HTML body. Mutually exclusive with blocks.
  - `blocks` object[] — 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.
  - `prompt` string — Natural-language request for branded native campaign blocks.
  - `style` string — Generation style; valid only with prompt.
  - `tone` string — Generation tone; valid only with prompt.
  - `emailPreset` 'branded' | 'minimal' — Per-email Style > Format for native Sequenzy blocks. This is separate from the prompt-generation `style` field. Cannot be combined with `html`, and a template or blocks payload stored as one standalone raw HTML block does not support it. Applying `minimal` removes standalone logo blocks; switching back to `branded` generates a new logo unless the authored logo block is sent again.
  - `campaignData` object, nullable
  - `computedLists` object[]
  - `labels` string[] — Label names to assign. Missing labels are created automatically.
  - `label` string[] — Compatibility alias for labels.
  - `templateId` string — Company-owned email template to copy into the campaign. Mutually exclusive with prompt, HTML, and blocks.
  - `segmentId` string — Shorthand for targeting one saved segment. Equivalent to `targetLists` `{"type":"segment","segmentId":"seg_123"}`. Mutually exclusive with targetLists and listIds.
  - `listIds` string[] — Shorthand for targeting one or more lists. Equivalent to `targetLists` `{"type":"lists","listIds":["list_123"]}`. Mutually exclusive with targetLists and segmentId.
  - `targetLists` object — Campaign audience saved on the draft. Omit to leave targeting unset and choose it when scheduling. The object is a union discriminated on type: {"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 and listIds.
  - `fromEmail` string, email — Campaign From address. Its domain must be configured and verified.
  - `fromName` 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 using senderProfileId, which already carries its own display name.
  - `senderProfileId` string — Existing sender profile ID. It already supplies both the From address and display name, so send it on its own and omit fromEmail and fromName.
  - `replyTo` string, email — Campaign Reply-To address. A reply profile is created when needed.
  - `replyToName` string — Display name for the Reply-To address. Requires replyTo; omit it when using replyProfileId, which already carries its own display name. An address carries one Reply-To name company-wide, so if replyTo already has a saved profile under a different name, that saved name is kept and the response `warnings` array says so.
  - `replyProfileId` string — Existing reply profile ID. It already supplies both the Reply-To address and display name, so send it on its own and omit replyTo and replyToName.

## Response `200`

Campaign created

- object
  - `success` boolean
  - `campaign` object
    - `id` string
    - `name` string
    - `subject` string
    - `emailId` string — The linked email body, reusable as `templateId` when creating later campaigns.
    - `emailPreset` 'branded' | 'minimal', nullable — Per-email Style > Format, derived from the stored blocks. `branded` renders the company logo and the full footer; `minimal` renders no logo and the simple footer. Null when the entire email is a single raw HTML block, which has no Sequenzy format. Sequence steps, campaigns, transactional templates, and saved templates all report this field, so chrome can be compared across emails without rendering them.
    - `status` string
    - `sentAt` string, date-time, nullable — Present when the campaign is created as an imported/already-sent campaign.
    - `trackingCode` string, nullable — Campaign tracking code available to UTM templates as `{{campaign.trackingCode}}`.
    - `labels` string[]
    - `targetLists` object, nullable — Saved campaign audience, or null when targeting is still unset.
    - `senderProfileId` string
    - `fromName` string
    - `fromEmail` string, email
    - `replyProfileId` string, nullable
    - `replyToName` string, nullable
    - `replyToEmail` string, email, nullable
    - `url` string, uri
    - `previewUrl` string, uri
  - `warnings` string[] — Non-blocking advisories about a successful write. Present when an input was discarded or did not take effect as requested. This includes block fields that do not render as their names suggest, sequence email-step formatting restored on top of submitted blocks, and sender-identity conflicts such as a replyToName that differs from the saved profile. Each message identifies the affected input and gives recovery guidance. Absent when there is nothing to report.

## Other responses

- `400` — Validation error or missing sender profile
- `401` — Unauthorized
- `500` — Campaign could not be created

## Changes

- **2026-08-26** `c78765f7e84f` — 2 info
  - added the new optional request property `emailPreset`
  - added the optional property `campaign/emailPreset` to the response with the `200` status
- **2026-08-19** `ba3a29c6eb33` — 3 info
  - added the optional property `retryable` to the response with the `400` status
  - added the optional property `retryable` to the response with the `401` status
  - added the optional property `retryable` to the response with the `500` status
- **2026-08-16** `6fd2903b91ce` — 3 info
  - added the optional property `code` to the response with the `400` status
  - added the optional property `code` to the response with the `401` status
  - added the optional property `code` to the response with the `500` status
- **2026-08-13** `fc5624c7d57a` — 1 info
  - added the new optional request property `listIds`
- **2026-08-03** `c6ff100192cf` — 1 info
  - added the optional property `campaign/emailId` to the response with the `200` status

[Full history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/campaigns/post.md)

---

[API](https://skmtc.dev/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.dev/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/revisions/73f826277d9a/schema)
