---
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, or campaign personalization data. Direct addresses create profiles when needed.

## 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.
  - `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. Send null to clear saved targeting and choose the audience when scheduling; omit to leave it unchanged. Mutually exclusive with segmentId.
  - `segmentId` string — Shorthand for retargeting the draft at one saved segment. Equivalent to `targetLists` `{"type":"segment","segmentId":"seg_123"}`. Mutually exclusive with targetLists.

## 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.
    - `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

---

[API](https://skmtc.net/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.net/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/versions/af1cf9620482/schema)
