Skip to main content

Get Pre-Publish Check

GET/v2/project/{project_key}/experiment/{test_id}/pre-publish-check

Run Mida's setup rules over a saved experiment before launching it: the same checks the dashboard runs on each step of the experiment wizard. Returns what blocks launch and what is worth a second look. It changes nothing.

Path parameters​

ParameterTypeDescription
project_keystringYour project key (the key= value in the Mida script tag).
test_idintegerNumeric experiment ID. Get this from List Experiments.

Example​

curl "https://api-{region}.mida.so/v2/project/YOUR_PROJECT_KEY/experiment/1234/pre-publish-check" \
-H "Authorization: Bearer YOUR_GENERATED_API_KEY"

Success response​

{
"success": true,
"test_id": 1234,
"ready": false,
"blockers": [
{
"id": "goal_assigned",
"step": "Goal",
"field": "goal_profile_id",
"status": "fail",
"title": "Conversion goal",
"detail": "No goal set — pick or create a goal so the test can measure something."
}
],
"warnings": [],
"passed": 12,
"checked_steps": ["Profile", "Targeting", "Goal", "Configuration", "Summary"],
"not_covered": "This reads the saved configuration only. It does not load the page, so it cannot tell whether a selector still matches the live site or whether the variant renders correctly. Open a preview URL to check that."
}

Response fields​

FieldTypeDescription
readybooleantrue when nothing blocks launch
blockersarrayProblems to fix before launching
warningsarrayWorth reviewing. They do not block launch
blockers[].id, warnings[].idstringStable identifier of the check
blockers[].stepstringThe setup step the check belongs to: Profile, Targeting, Goal, Configuration or Summary
blockers[].fieldstring | nullThe setting the check is about, when there is one
blockers[].title, blockers[].detailstringThe check and what it found, as the dashboard words them
passedintegerHow many checks passed
not_coveredstringWhat this check does not look at

What it covers​

Name and page URL, page targeting and audience rules, the goal, the traffic split, variant code and selectors, and overlap with other live experiments in the project.

It reads the saved configuration only. It does not load the page, so ready: true does not mean the variant renders correctly. Open the links from Get Experiment Preview URLs to check that.

Errors​

StatusMeaning
401Missing or wrong API key
404Project or experiment not found in this project
429More than 20 checks in a minute for this account