Create a new experiment

Create a new A/B testing experiment.

Creates a new A/B experiment.

Requires authentication.

Request

POST /experiment

Headers

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
titlestringYesDisplay title for the experiment.
casestringYesExperiment type: ranking_mix, recommendation, frontend, personalization, or landingpage.
variationsarrayYesArray of variation segment definitions. Each must have a name and trafficDistribution (percentage).
descriptionstringNoOptional description.
manualStartbooleanNoWhen true (default), the experiment must be started manually. When false, provide startDate.
startDatestringNoISO 8601 scheduled start date. Required when manualStart is false.
manualStopbooleanNoWhen false, the experiment auto-stops based on stoppingThreshold and stoppingMetric.
stoppingThresholdnumberNoStatistical confidence threshold for automatic stopping.
stoppingMetricstringNoMetric used to evaluate automatic stopping.

Example Request

{
  "title": "Ranking Mix Test — April 2026",
  "description": "Testing updated relevance weights",
  "case": "ranking_mix",
  "variations": [
    {
      "name": "Variation A",
      "trafficDistribution": 50
    },
    {
      "name": "Variation B",
      "trafficDistribution": 50
    }
  ],
  "manualStart": true,
  "manualStop": false,
  "stoppingThreshold": 95,
  "stoppingMetric": "conversion_rate"
}

Response

Returns the created experiment object.

Example Response

{
  "id": 42,
  "title": "Ranking Mix Test — April 2026",
  "case": "ranking_mix",
  "status": "draft",
  "running": false,
  "finished": false
}
Body Params
string
required

Experiment title

string
string
enum
required

Type of experiment

Allowed:
variations
array of objects
required

List of variation segments

variations*
boolean
Defaults to true

If false, provide startDate for scheduled start

date-time

Scheduled start date (required when manualStart is false)

boolean
Defaults to false

If false, provide stoppingThreshold and stoppingMetric

number

Statistical threshold for automatic stopping

string

Metric used for automatic stopping

Headers
string
required

Makaira Instance ID

Response

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json