Skip to main content

Update Experiment Status

PATCH/v2/project/{project_key}/experiment/{test_id}/status

Start, 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

ParameterDescription
project_keyYour project's API key
test_idThe numeric experiment ID

Status values

Pass status as an integer:

ValueAction
1Start or resume the experiment. Visitors will be bucketed into variants.
0Deactivate the experiment. No new data is collected, but existing data is preserved. Can be restarted.
9Move 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

StatusMeaning
400Invalid status value — must be 0, 1, or 9
401Invalid or missing API key
404Experiment not found
Next step

Once your experiment is live and collecting data, use Get Experiment Result to track per-variant conversion rates and improvement.