Campaigns

Update campaign (draft status only)

Update a campaign draft. Only campaigns in 'draft' status can be updated; any other status returns 409. To change a campaign that is no longer a draft, copy it and edit the new draft copy.

Scopes: campaigns.write

Rate Limiting: This endpoint is rate limited to 400 requests per minute.

patch/campaigns/{id}

Request

  • Base URL
    https://api.omnisend.com/api
  • URL
    https://api.omnisend.com/api/campaigns/{id}
  • Auth
    • OAuth 2
      Client credentials
      Token URL: https://app.omnisend.com/oauth2/token scopes: campaigns.write
    • or API key in header Authorization

Path parameters

idstring required

Campaign ID (24 character hexadecimal)

Headers

Omnisend-Versionstring required

API version that specifies the response format and behaviour

Request body

languagestring

Campaign language locale in xx_XX format. Must be a supported language

namestring

Campaign name

Example request

{
  "abTest": {
    "settings": {
      "decisionTime": {
        "amount": 4,
        "unit": "h"
      },
      "testSizePercent": 20,
      "winningMetric": "openRate"
    },
    "variants": {
      "a": {
        "content": {
          "email": {
            "preheader": "Preheader for A",
            "replyToEmail": "support@example.com",
            "senderEmail": "hello@example.com",
            "senderName": "My Store",
            "subject": "Version A subject"
          }
        }
      },
      "b": {
        "content": {
          "email": {
            "preheader": "Preheader for A",
            "replyToEmail": "support@example.com",
            "senderEmail": "hello@example.com",
            "senderName": "My Store",
            "subject": "Version A subject"
          }
        }
      }
    }
  },
  "boosterSettings": {
    "delay": {
      "amount": 48,
      "unit": "h"
    },
    "sendTo": "nonOpeners"
  },
  "content": {
    "email": {
      "preheader": "Discover what we have in store for you",
      "replyToEmail": "support@example.com",
      "senderEmail": "hello@example.com",
      "senderName": "My Store",
      "subject": "Welcome to Omnisend!"
    },
    "sms": {
      "compliance": {
        "stopKeywordText": "Reply STOP to opt out",
        "unsubscribeLinkText": "Unsubscribe [[unsubscribe_link]]"
      },
      "imageID": "000000000000000000000001",
      "isLinkShorteningEnabled": true,
      "message": "Hi! Check out our deals"
    }
  },
  "language": "en_US",
  "name": "Welcome Campaign",
  "sendingSettings": {
    "optimizeFor": "opens",
    "respectQuietHours": true,
    "scheduledAt": "2026-06-15T00:00:00+03:00",
    "strategy": "immediate"
  }
}

Response

Updated campaign

brandIDstring

Brand unique identifier (read-only)

channel'email' | 'push' | 'sms'

Campaign message channel

createdAtstring

Campaign creation timestamp (read-only)

endedAtstring

Campaign end timestamp (read-only)

idstring

Campaign unique identifier (read-only)

languagestring

Campaign language locale in xx_XX format

namestring

Campaign name

startedAtstring

Campaign start timestamp (read-only)

status'draft' | 'scheduled' | 'started' | 'sent' | 'error' | 'canceled' | 'paused' | 'onHold' | 'expired' | 'stopped'

Campaign status

type'regular' | 'abTest' | 'booster'

Campaign type

updatedAtstring

Campaign last update timestamp (read-only)

urlstring

Link to the campaign in the Omnisend app (read-only): the settings page of a draft campaign (for a booster, the parent campaign's booster page) or the report of a started, sent, canceled, stopped or expired campaign. Omitted for scheduled, paused, on-hold and error campaigns.

Example response

{
  "abTest": {
    "result": {
      "selectedAt": "2026-01-15T10:30:00Z",
      "winnerVariantID": "000000000000000000000011"
    },
    "settings": {
      "decisionTime": {
        "amount": 4,
        "unit": "h"
      },
      "testSizePercent": 30,
      "winningMetric": "openRate"
    },
    "variants": {
      "a": {
        "content": {
          "email": {
            "contentID": "000000000000000000000001",
            "preheader": "Check it out",
            "replyToEmail": "support@example.com",
            "senderEmail": "hello@example.com",
            "senderName": "My Store",
            "subject": "Welcome!"
          }
        },
        "id": "000000000000000000000010"
      },
      "b": {
        "content": {
          "email": {
            "contentID": "000000000000000000000001",
            "preheader": "Check it out",
            "replyToEmail": "support@example.com",
            "senderEmail": "hello@example.com",
            "senderName": "My Store",
            "subject": "Welcome!"
          }
        },
        "id": "000000000000000000000010"
      }
    }
  },
  "boosterSettings": {
    "campaignID": "000000000000000000000001",
    "delay": {
      "amount": 48,
      "unit": "h"
    },
    "sendTo": "nonOpeners"
  },
  "brandID": "000000000000000000000001",
  "content": {
    "email": {
      "contentID": "000000000000000000000001",
      "preheader": "Discover what we have in store for you",
      "replyToEmail": "support@example.com",
      "senderEmail": "hello@example.com",
      "senderName": "My Store",
      "subject": "Welcome to Omnisend!"
    },
    "sms": {
      "compliance": {
        "stopKeywordText": "Reply STOP to opt out",
        "unsubscribeLinkText": "Unsubscribe [[unsubscribe_link]]"
      },
      "imageID": "000000000000000000000001",
      "isLinkShorteningEnabled": true,
      "message": "Hi! Check out our new deals",
      "senderName": "My Store"
    }
  },
  "createdAt": "2026-01-15T10:30:00Z",
  "endedAt": "2026-01-15T10:30:00Z",
  "id": "000000000000000000000001",
  "language": "en_US",
  "name": "Welcome Email Campaign",
  "sendingSettings": {
    "optimizeFor": "opens",
    "respectQuietHours": true,
    "scheduledAt": "2026-03-01T10:00:00Z",
    "strategy": "immediate"
  },
  "startedAt": "2026-01-15T10:30:00Z",
  "updatedAt": "2026-01-15T10:30:00Z",
  "url": "https://app.omnisend.com/campaign/email/000000000000000000000001/settings"
}

Changes

No recorded changes to this operation across all 1 revision of this API.