---
title: "Update a draft campaign"
method: PUT
path: "/campaigns/{campaignId}"
tags: ["Campaigns"]
---

# Update a draft campaign

`PUT /campaigns/{campaignId}`

Update a draft campaign's name, labels, content, audience, From/Reply-To settings, campaign personalization data, or delivery pacing (sendTimeOptimization and sendTimeWindowHours). Direct addresses create profiles when needed. Send Time Optimization is campaign-only; sequences use sendingWindow.

## Path parameters

- `campaignId` string, required

## Request body

- object
  - `name` string — Updated campaign name
  - `subject` string — Updated email subject line
  - `previewText` string, nullable — Updated inbox preview text. Set to null to clear it.
  - `preheaderText` string, nullable — Compatibility alias for previewText.
  - `trackingCode` string, nullable — Campaign tracking code available to UTM templates as `{{campaign.trackingCode}}`. Send an empty string or null to clear it.
  - `html` string — Updated email HTML content. Mutually exclusive with `blocks`.
  - `blocks` object[] — Updated 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.
  - `emailPreset` 'branded' | 'minimal' — Change the linked email's Style > Format without rewriting its copy. Supported only for native Sequenzy blocks and cannot be combined with `html`. An email 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.
  - `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 — Reply-To email for this campaign. A profile is created when needed. Mutually exclusive with `replyProfileId`.
  - `replyProfileId` string — Reply profile ID for this company. It already supplies both the Reply-To address and display name, so send it on its own and omit replyTo and replyToName.
  - `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.
  - `ccEmails` string[], nullable — Addresses CC'd on every recipient's email for this campaign. Send an empty array or null to clear them.
  - `bccEmails` string[], nullable — Addresses BCC'd on every recipient's email for this campaign. Send an empty array or null to clear them.
  - `labels` string[] — Replacement label names. Send an empty array to clear labels. Missing labels are created automatically.
  - `label` string[] — Compatibility alias for labels.
  - `campaignData` object, nullable — Campaign-scoped JSON data available while rendering this campaign. Top-level arrays can contain up to 500 items. Set to null to clear it.
  - `computedLists` object[] — Personalized list definitions computed from campaignData. Keys can use letters, numbers, underscores, and dots. Use maxItems to cap each subscriber's list length. Pass an empty array to clear computed lists.
  - `targetLists` object, nullable — Replacement campaign audience, using the same shapes as campaign create, e.g. {"type":"lists","listIds":["list_123"]}. Send null to clear saved targeting and choose the audience when scheduling; omit to leave it unchanged. Mutually exclusive with segmentId and listIds.
  - `segmentId` string — Shorthand for retargeting the draft at one saved segment. Equivalent to `targetLists` `{"type":"segment","segmentId":"seg_123"}`. Mutually exclusive with targetLists and listIds.
  - `listIds` string[] — Shorthand for retargeting the draft at one or more lists. Equivalent to `targetLists` `{"type":"lists","listIds":["list_123"]}`. Mutually exclusive with targetLists and segmentId.
  - `sendTimeOptimization` boolean — Deliver each recipient at their predicted best open hour within sendTimeWindowHours of scheduledAt. Campaign-only: there is no company or sequence STO toggle. Sequences use sendingWindow instead. Persists on the draft until schedule overrides it. spreadOverHours and sendInRecipientTimezone each turn STO off.
  - `sendTimeWindowHours` integer — STO delivery window in hours from scheduledAt. Defaults to 12. Only used when sendTimeOptimization is true.

## Response `200`

Campaign updated successfully

- object
  - `success` boolean, required
  - `campaign` object, required
    - `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
    - `labels` string[]
    - `targetLists` object, nullable — Saved campaign audience, or null when targeting is still unset.
    - `replyProfileId` string, nullable
    - `replyToName` string, nullable
    - `replyToEmail` string, email, nullable
    - `ccEmails` string[], nullable
    - `bccEmails` string[], 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
- `401` — Unauthorized
- `404` — Campaign not found
- `422` — Request body failed schema validation
- `503` — The database was temporarily unavailable. The request may be retried after the delay in Retry-After.

## Changes

> 121 revisions in range; 89 could not be searched.

- **2026-05-11** `ee7b7111c55b` — 3 info
  - api operation id `updateCampaign` was added
  - added the new optional request property `campaignData`
  - added the new optional request property `computedLists`
- **2026-04-16** `3e7678233a4e` — 1 info
  - added the new optional request property `blocks`
- **2026-04-12** `b56685d87b35` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/campaigns/:campaignId/put.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)
