Update Experiment Status
PATCH
/v2/project/{project_key}/experiment/{test_id}/statusStart, pause, or deactivate an experiment by updating its status. This is the primary way to control an experiment's lifecycle via the API.
Path parameters
| Parameter | Description |
|---|---|
project_key | Your project's API key |
test_id | The numeric experiment ID |
Status values
Pass status as an integer:
| Value | Action |
|---|---|
1 | Start or resume the experiment. Visitors will be bucketed into variants. |
0 | Deactivate the experiment. No new data is collected, but existing data is preserved. Can be restarted. |
9 | Move back to draft (only valid from inactive). |
Example: start an experiment
curl -X PATCH "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/experiment/1234/status" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": 1}'
Example: deactivate a running experiment
curl -X PATCH "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/experiment/1234/status" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": 0}'
Example: move back to draft
curl -X PATCH "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/experiment/1234/status" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": 9}'
Success response
{
"success": true,
"test_id": 1234,
"status": 1
}
Error responses
| Status | Meaning |
|---|---|
400 | Invalid status value — must be 0, 1, or 9 |
401 | Invalid or missing API key |
404 | Experiment not found |
Next step
Once your experiment is live and collecting data, use Get Experiment Result to track per-variant conversion rates and improvement.