---
title: "List form A/B setups"
method: GET
path: "/form-ab-setups"
tags: ["Form A/B Setups"]
---

# List form A/B setups

`GET /form-ab-setups`

## Request

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

List form A/B setups with sorting and cursor-based pagination support. Each setup includes the auto-close
policy configured when the test was started (if any).

**Scopes:**
`forms.read`

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

**Pagination:**
This endpoint uses cursor-based pagination. Use the `after` cursor from the response to get the next page,
or the `before` cursor to get the previous page. Do not use both `after` and `before` parameters simultaneously.

**Sorting:**
- Only single-field sorting is supported. You cannot sort by multiple fields.
- Available sort fields: `createdAt` (default), `launchedAt`, `enabledAt`, `updatedAt`.
- Sort parameters are only required on the first request. Subsequent requests using a cursor
will automatically use the sort settings embedded in the cursor.

**Cursor Behavior:**
- Cursors are self-contained and include all parameters needed for pagination.
- Once you have a cursor, you only need to pass the cursor for subsequent pages.
- If sort parameters are provided with a cursor, they must match the cursor's sort settings.
- Cursors may become invalid if the underlying data changes significantly (e.g., the referenced setup is deleted).

## Query parameters

- `limit` integer
- `after` string
- `before` string
- `sort` 'createdAt' | 'launchedAt' | 'enabledAt' | 'updatedAt'
- `direction` 'asc' | 'desc'
- `status` 'draft' | 'enabled' | 'disabled'

## Headers

- `Omnisend-Version` string, required

## Response `200`

Form A/B setups list

- AbSetupsResponse: Paginated list of form A/B setups.
  - `abSetups` AbSetup[]
    - `autoClose` AbSetupAutoClose: Auto-close policy for a form A/B setup.
      - `endsAt` string: Instant at which the test closes automatically. Must be in the future when the test is started.
      - `stopOnSignificance` boolean: Close the test as soon as one variant is a statistically significant winner.
    - `createdAt` string: A/B setup creation timestamp (read-only)
    - `enabledAt` string: A/B setup enable timestamp (read-only)
    - `id` string: A/B setup unique identifier (read-only)
    - `launchedAt` string: A/B setup launch timestamp (read-only)
    - `mainForm` AbSetupMainFormResponse: Main form of an A/B setup.
      - `formID` string: Form unique identifier (read-only)
      - `name` string: Form name
      - `status` 'enabled' | 'disabled' | 'draft': Form status.
    - `status` 'enabled' | 'draft' | 'disabled': A/B test status of a form. `disabled` is a launched A/B test that is currently paused.
    - `updatedAt` string: A/B setup last update timestamp (read-only)
    - `versions` AbSetupVersionResponse[]: Variant forms of the A/B setup
      - `formID` string: Form unique identifier (read-only)
      - `name` string: Form name
      - `weight` integer: Traffic distribution weight for the variant. Range: 0-100
  - `paging` PagingResponse: Cursor-based pagination metadata
    - `cursors` CursorsResponse: Cursor pointers for paginating forward and backward through results
      - `after` string, nullable: Opaque cursor for fetching the next page of results
      - `before` string, nullable: Opaque cursor for fetching the previous page of results
    - `hasMore` boolean: Whether there are more items available beyond the current page
    - `limit` integer: Maximum number of items returned per page

## Other responses

- `400`: Invalid request parameters
- `401`: Authentication is missing or invalid
- `403`: Insufficient permissions for this operation
- `410`: API version has been retired
- `429`: Rate limit exceeded
- `500`: Unexpected error occurred

---

[API](https://skmtc.dev/omnisend/apis/forms-api.md) - [All operations](https://skmtc.dev/omnisend/apis/forms-api/llms.txt) - [OpenAPI document](https://skmtc.dev/omnisend/apis/forms-api/revisions/9b53556b2e97?raw)
