---
title: "Update campaign"
method: PATCH
path: "/campaigns/{id}"
tags: ["Campaigns"]
---

# Update campaign

`PATCH /campaigns/{id}`

Update a campaign draft.

**Scopes:**
`campaigns.write`

## Path parameters

- `id` string, required

## Headers

- `Omnisend-Version` string, required

## Request body

- UpdateCampaignRequest — Campaign update request
  - `abTest` UpdateABTest — A/B test update block. Full replacement semantics.
    - `settings` UpdateABTestSettings — A/B test settings for update
      - `decisionTime` UpdateABTestDecisionTime — Decision time for A/B test winner selection
        - `amount` integer, required — Amount of time units
        - `unit` 'h' | 'd', required — Time unit: "h" (hours, 1–168) or "d" (days, 1–7)
      - `testSizePercent` integer — Percentage of audience used for the test (10–100)
      - `winningMetric` 'openRate' | 'clickRate' — Metric used to determine the winner
    - `variants` UpdateABTestVariants — Per-variant content for A/B test update
      - `a` UpdateABTestVariant — Content fields for a single A/B variant. Email fields live under `content.email`.
        - `content` UpdateABTestVariantContent — Variant content grouped by channel for update.
          - `email` UpdateABTestVariantEmail — Email content fields for an A/B test variant update.
            - `preheader` string — Email preheader text
            - `replyToEmail` string — Reply-to email address
            - `senderEmail` string — Sender email address
            - `senderName` string — Sender display name
            - `subject` string — Email subject line
      - `b` UpdateABTestVariant — Content fields for a single A/B variant. Email fields live under `content.email`.
        - `content` UpdateABTestVariantContent — Variant content grouped by channel for update.
          - `email` UpdateABTestVariantEmail — Email content fields for an A/B test variant update.
            - `preheader` string — Email preheader text
            - `replyToEmail` string — Reply-to email address
            - `senderEmail` string — Sender email address
            - `senderName` string — Sender display name
            - `subject` string — Email subject line
  - `audience` Audience — Campaign audience
    - `excludedSegmentIDs` string[] — Segments to exclude from the audience
    - `includedSegmentIDs` string[] — Segments to include. Empty includes all subscribers
  - `boosterSettings` UpdateBoosterSettings — Booster-specific settings for campaign update.
    - `delay` UpdateBoosterDelay — Delay settings for booster campaign
      - `amount` integer, required — Amount of time units. Minimum 0 (SMS booster only — means "send together with parent"). Maximum 240 hours (or 10 days)
      - `unit` 'h' | 'd', required — Time unit: "h" for hours, "d" for days
    - `sendTo` 'nonOpeners' | 'nonClickers' — Which recipients to target: "nonOpeners" or "nonClickers"
  - `content` UpdateContent — Campaign content for update
    - `email` UpdateEmail — Email content for campaign update
      - `preheader` string — Email preheader text
      - `replyToEmail` string — Reply-to email address for recipient responses. Must be a verified email
      - `senderEmail` string — Sender email address. Must belong to a verified brand domain
      - `senderName` string — Sender display name shown in the recipient's inbox
      - `subject` string — Email subject line
    - `sms` UpdateSMS — SMS content for campaign update
      - `compliance` UpdateSMSCompliance — SMS compliance text settings for update
        - `stopKeywordText` string — STOP keyword text for US/CA recipients
        - `unsubscribeLinkText` string — Unsubscribe link text for non-US/CA recipients
      - `imageID` string — Image ID obtained from the Images API. When set, the message is delivered as MMS to US/CA recipients; other countries receive SMS without the image. Image must be JPEG, JPG, PNG, or GIF and not exceed 500 KB
      - `isLinkShorteningEnabled` boolean — Auto-shorten links in message body
      - `message` string — SMS message body. When sent as SMS, the message (including the appended compliance text and unsubscribe link/keyword) must not exceed 9 SMS segments for either US/CA or other-country recipients. When sent as MMS, the message (including the appended compliance text) must not exceed 1600 characters for US/CA recipients.
  - `language` string — Campaign language locale in xx_XX format. Must be a supported language
  - `name` string — Campaign name
  - `sendingSettings` UpdateSendingSettings — Sending settings for campaign update. Full object replacement - all fields must be provided
    - `isTZOptimizationEnabled` boolean — Whether timezone optimization is enabled. Only available with scheduled strategy, and only in email campaigns
    - `scheduledAt` string — Campaign scheduled send time in RFC 3339 format. Required when strategy is "scheduled", must not be set for "immediate". Must be in the future and within one year from now
    - `strategy` 'immediate' | 'scheduled' — Sending strategy

## Response `200`

Updated campaign

- Campaign — Campaign resource. When `type` is `booster`, the `boosterSettings` field is populated, identifying the parent campaign and the conditions under which the booster targets recipients of that parent.
  - `abTest` ABTest — A/B test configuration. Variants are keyed by "a" and "b"; the parent campaign's `content` field is omitted because variants carry their own content. `result` is populated once a winner is selected and is `null` otherwise.
    - `result` ABTestResult — A/B test result (read-only).
      - `isManuallySelected` boolean — Whether the winner was manually selected (read-only)
      - `selectedAt` string — When the winner was selected (read-only)
      - `winnerVariantID` string — Campaign ID of the winning variant (read-only). Matches variants.a.id or variants.b.id.
    - `settings` ABTestSettings — A/B test settings.
      - `decisionTime` ABTestDecisionTime — Decision time before selecting a winner. Same shape as booster delay.
        - `amount` integer — Amount of time units to wait
        - `unit` 'h' | 'd' — Time unit: "h" for hours, "d" for days
      - `testSizePercent` integer — Percentage of audience for the test phase (10-100)
      - `winningMetric` 'openRate' | 'clickRate' — Winner determination metric
    - `variants` ABTestVariants — A/B test variants object with keys "a" and "b".
      - `a` ABTestVariant — A/B test variant. Email-specific fields live under `content.email`.
        - `content` ABTestVariantContent — A/B test variant content grouped by channel.
          - `email` ABTestVariantEmail — Email content fields for an A/B test variant.
            - `contentID` string — Email content unique identifier referencing the variant's email design
            - `preheader` string — Preheader text
            - `replyToEmail` string — Reply-to email address
            - `senderEmail` string — Sender email address
            - `senderName` string — Sender display name
            - `subject` string — Email subject line
        - `id` string — Variant campaign ID (read-only). Used for reporting API access.
      - `b` ABTestVariant — A/B test variant. Email-specific fields live under `content.email`.
        - `content` ABTestVariantContent — A/B test variant content grouped by channel.
          - `email` ABTestVariantEmail — Email content fields for an A/B test variant.
            - `contentID` string — Email content unique identifier referencing the variant's email design
            - `preheader` string — Preheader text
            - `replyToEmail` string — Reply-to email address
            - `senderEmail` string — Sender email address
            - `senderName` string — Sender display name
            - `subject` string — Email subject line
        - `id` string — Variant campaign ID (read-only). Used for reporting API access.
  - `audience` Audience — Campaign audience
    - `excludedSegmentIDs` string[] — Segments to exclude from the audience
    - `includedSegmentIDs` string[] — Segments to include. Empty includes all subscribers
  - `boosterSettings` BoosterSettings — Booster-specific settings.
    - `campaignID` string, required — Parent campaign ID this booster follows up on
    - `delay` BoosterDelay — Delay between the parent campaign send and the booster send.
      - `amount` integer — Amount of time units before the booster is sent
      - `unit` 'h' | 'd' — Time unit: "h" for hours, "d" for days
    - `sendTo` 'nonOpeners' | 'nonClickers', required — Audience selector. The booster targets recipients of the parent who did NOT perform the implied action (`nonOpeners` did not open; `nonClickers` did not click).
  - `brandID` string — Brand unique identifier (read-only)
  - `channel` 'email' | 'push' | 'sms' — Campaign message channel
  - `content` Content — Campaign content
    - `email` Email — Email content
      - `contentID` string — Email content unique identifier referencing the campaign's email design
      - `preheader` string — Email preheader text displayed after the subject line in the recipient's inbox
      - `replyToEmail` string — Reply-to email address for recipient responses
      - `senderEmail` string — Sender email address shown in the recipient's inbox
      - `senderName` string — Sender display name shown in the recipient's inbox
      - `subject` string — Email subject line displayed in the recipient's inbox
    - `sms` SMS — SMS message content
      - `compliance` SMSCompliance — SMS compliance text settings
        - `stopKeywordText` string — STOP keyword text for US/CA recipients. Max 250 chars
        - `unsubscribeLinkText` string — Unsubscribe link text for non-US/CA recipients. Max 250 chars
      - `imageID` string — Image ID obtained from the Images API. When set, the message is delivered as MMS to US/CA recipients; other countries receive SMS without the image. Image must be JPEG, JPG, PNG, or GIF and not exceed 500 KB
      - `isLinkShorteningEnabled` boolean — Auto-shorten links in message body
      - `message` string — SMS message body. When sent as SMS, the message (including the appended compliance text and unsubscribe link/keyword) must not exceed 9 SMS segments for either US/CA or other-country recipients. When sent as MMS, the message (including the appended compliance text) must not exceed 1600 characters for US/CA recipients.
      - `senderName` string — Sender display name. Max 250 chars
  - `createdAt` string — Campaign creation timestamp (read-only)
  - `endedAt` string — Campaign end timestamp (read-only)
  - `id` string — Campaign unique identifier (read-only)
  - `language` string — Campaign language locale in xx_XX format
  - `name` string — Campaign name
  - `sendingSettings` SendingSettings — Campaign sending settings
    - `isTZOptimizationEnabled` boolean — Whether timezone optimization is enabled. Only available with scheduled strategy, and only in email campaigns
    - `scheduledAt` string — Scheduled send time in RFC 3339 format. Present when strategy is scheduled
    - `strategy` 'immediate' | 'scheduled' — Sending strategy
  - `startedAt` string — Campaign start timestamp (read-only)
  - `status` 'draft' | 'scheduled' | 'started' | 'sent' | 'error' | 'canceled' | 'paused' | 'onHold' | 'expired' | 'stopped' — Campaign status
  - `type` 'regular' | 'abTest' | 'booster' — Campaign type
  - `updatedAt` string — Campaign last update timestamp (read-only)

## Other responses

- `400` — Request contains invalid or missing fields
- `401` — Authentication is missing or invalid
- `403` — Insufficient permissions for this operation
- `404` — Campaign not found
- `409` — Campaign state does not allow modification
- `410` — API version has been retired
- `429` — Rate limit exceeded
- `500` — Unexpected error occurred

---

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