post
https://{yourinstance}.makaira.io/experiment
Create a new A/B testing experiment.
Creates a new A/B experiment.
Requires authentication.
Request
POST /experiment
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Display title for the experiment. |
case | string | Yes | Experiment type: ranking_mix, recommendation, frontend, personalization, or landingpage. |
variations | array | Yes | Array of variation segment definitions. Each must have a name and trafficDistribution (percentage). |
description | string | No | Optional description. |
manualStart | boolean | No | When true (default), the experiment must be started manually. When false, provide startDate. |
startDate | string | No | ISO 8601 scheduled start date. Required when manualStart is false. |
manualStop | boolean | No | When false, the experiment auto-stops based on stoppingThreshold and stoppingMetric. |
stoppingThreshold | number | No | Statistical confidence threshold for automatic stopping. |
stoppingMetric | string | No | Metric 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
}
