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
}

Plan limits (free & Agency Lite)

Activating an experiment (status: 1) counts toward the same concurrent live experiment limit as the Mida app (2 per project) for Sandbox (paid_plan 300) and Agency Lite (paid_plan 305). If two other experiments are already live for this project, the API returns 403.

This check applies when moving from draft or inactive to live. If the experiment is already live, updating status to 1 again does not re-check the cap.

See Create Experiment — Plan limits.

Error responses

StatusMeaning
400Invalid status value — must be 0, 1, or 9
401Invalid or missing API key
403Plan limit — maximum concurrent live experiments per project reached
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.