Skip to main content
POST
/
api
/
ab-tests
Error
A valid request URL is required to generate request examples
{
  "_id": "<string>",
  "accountId": "<string>",
  "name": "<string>",
  "status": "draft",
  "variants": [
    {
      "agentConfigId": "<string>",
      "weight": 50.5
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "description": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token using an API key (format: nl_live_* or nl_test_*).

Body

application/json

Request body for creating a new A/B test.

name
string
required

A/B test display name

variants
object[]
required

At least two agent configuration variants to compare

Minimum array length: 2
description
string

Optional description of the test hypothesis

Response

A/B test created successfully

An A/B test comparing multiple agent configurations.

_id
string
required

Unique A/B test identifier

accountId
string
required

Account that owns this A/B test

name
string
required

A/B test display name

status
enum<string>
required

Current test lifecycle status

Available options:
draft,
running,
paused,
completed
variants
object[]
required

Agent configuration variants being compared

Minimum array length: 2
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
description
string

Optional description of the test hypothesis