Form A/B Setups

Create a form A/B setup

Create a draft form A/B setup from an existing popup, flyout or fullscreen form. Only those display types are eligible; the source form becomes the setup's main form and its two variants start as identical copies that can be edited independently afterward. The setup is created in draft status and does not serve traffic until started via POST /form-ab-setups/{abSetupID}/start.

Each variant carries a traffic-distribution weight. When versions is omitted, both variants receive a weight of 50; otherwise each weight must be at least 1 and the weights must sum to 100.

Scopes: forms.write

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

post/form-ab-setups

Request

  • Base URL
    https://api.omnisend.com/api
  • URL
    https://api.omnisend.com/api/form-ab-setups
  • Auth
    • OAuth 2
      Client credentials
      Token URL: https://app.omnisend.com/oauth2/token scopes: forms.write
    • or API key in header Authorization

Headers

Omnisend-Versionstring required

API version that specifies the response format and behaviour

Request body

formIDstring required

Main form unique identifier

Example request

{
  "formID": "000000000000000000000001",
  "versions": [
    {
      "name": "Variant A",
      "weight": 50
    }
  ]
}

Response

Created form A/B setup

createdAtstring

A/B setup creation timestamp (read-only)

enabledAtstring

A/B setup enable timestamp (read-only)

idstring

A/B setup unique identifier (read-only)

launchedAtstring

A/B setup launch timestamp (read-only)

status'enabled' | 'draft' | 'disabled'

A/B test status of a form. disabled is a launched A/B test that is currently paused.

updatedAtstring

A/B setup last update timestamp (read-only)

Example response

{
  "autoClose": {
    "endsAt": "2026-09-30T23:59:59Z",
    "stopOnSignificance": true
  },
  "createdAt": "2026-02-20T14:00:00Z",
  "enabledAt": "2026-03-01T09:00:00Z",
  "id": "683b1a2e3f4a5b6c7d8e9f00",
  "launchedAt": "2026-03-01T09:00:00Z",
  "mainForm": {
    "formID": "683b1a2e3f4a5b6c7d8e9f00",
    "name": "Newsletter Signup"
  },
  "updatedAt": "2026-03-10T14:00:00Z",
  "versions": [
    {
      "formID": "683b1a2e3f4a5b6c7d8e9f01",
      "name": "Variant A",
      "weight": 50
    }
  ]
}

Changes

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