v1

latestOpenAPI 3.0.02026-07-2664192238.8 KB
Campaigns

Create campaign

Create a new campaign draft.

Scopes: campaigns.write

post/campaigns

Headers

Omnisend-Versionstring required

API version that specifies the response format and behaviour

Request body

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

Campaign message channel

languagestring

Campaign language locale in xx_XX format. Required for regular campaigns (not required for booster or abTest). Must be a supported language

namestring

Campaign name. Required for regular and abTest campaigns (not required for booster)

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

Campaign type.

When type is booster, there are two supported flows:

Flow 1 — draft parent + draft booster: Create a draft parent campaign, then create a draft booster for it (set boosterSettings.delay to control when it fires). Send the parent; the booster is scheduled automatically based on the configured delay.

Flow 2 — already-sent parent: Create and send a parent campaign first. Once it reaches sent status, create the booster campaign (omit boosterSettings.delay) and use sendingSettings.scheduledAt to set the exact send time. Then call the send endpoint on the booster.

Example request

{
  "abTest": {
    "settings": {
      "decisionTime": {
        "amount": 4,
        "unit": "h"
      },
      "testSizePercent": 30,
      "winningMetric": "openRate"
    },
    "variants": {
      "a": {
        "content": {
          "email": {
            "preheader": "Check it out",
            "replyToEmail": "support@example.com",
            "senderEmail": "hello@example.com",
            "senderName": "My Store",
            "subject": "Welcome!",
            "templateID": "000000000000000000000001"
          }
        }
      },
      "b": {
        "content": {
          "email": {
            "preheader": "Check it out",
            "replyToEmail": "support@example.com",
            "senderEmail": "hello@example.com",
            "senderName": "My Store",
            "subject": "Welcome!",
            "templateID": "000000000000000000000001"
          }
        }
      }
    }
  },
  "boosterSettings": {
    "campaignID": "000000000000000000000001",
    "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!",
      "templateID": "000000000000000000000001"
    },
    "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": {
    "scheduledAt": "2026-06-15T10:00:00Z",
    "strategy": "immediate"
  },
  "type": "regular"
}

Response

Created 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)

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": {
    "scheduledAt": "2026-03-01T10:00:00Z",
    "strategy": "immediate"
  },
  "startedAt": "2026-01-15T10:30:00Z",
  "updatedAt": "2026-01-15T10:30:00Z"
}