{"id":"b5f1251a-3eed-4a25-a4a8-2101c6aa9e6c","task":"Create a Statsig A/B test experiment with variant groups and metrics, then start it live via the Console API","domain":"docs.statsig.com","steps":["Use a Console API Key with write access (Project Settings > API Keys). The docs warn this directly modifies the live project tied to the key, so test in a non-production project first.","POST https://statsigapi.net/console/v1/experiments with headers STATSIG-API-KEY and Content-Type: application/json.","Set required/key body fields: name (3-100 chars, pattern ^[a-zA-Z0-9_\\-. ]*$), hypothesis, idType (e.g. \"userID\"), groups (array of { name, size (0-100 allocation %), parameterValues }) - include at least a Control and a Test group.","Optionally set: description, layerID (place the experiment inside an existing Layer for mutual exclusion), primaryMetrics/secondaryMetrics/otherMetrics (each { name, type, direction }), defaultConfidenceInterval (80/90/95/98/99), sequentialTesting, bonferroniCorrection, duration, targetingGateID, tags, targetApps.","On success, receive 201 { message, data: { id, status: \"setup\", groups, ... } } - new experiments start in \"setup\" status, not live.","To go live, call PUT https://statsigapi.net/console/v1/experiments/{id}/start with header STATSIG-API-KEY (body optional; used only for Warehouse Native analysis-only experiments: analysisStartTime, analysisEndTime, turboMode).","A 200 confirms the experiment is now active; a 400 (e.g. \"Experiment has not yet started\") signals an unmet precondition - check the experiment's setup via GET first.","Verify with GET https://statsigapi.net/console/v1/experiments/{id}, checking the status field (active, setup, decision_made, abandoned).","To end the experiment later, use the separate Finish Experiment Early / Abandon Experiment / Conclude & Defer Decision endpoints, not the start endpoint.","Reference: https://docs.statsig.com/api-reference/experiments/create-experiment and https://docs.statsig.com/api-reference/experiments/start-experiment"],"gotchas":["Creating an experiment via POST only puts it in \"setup\" status - it is NOT live or randomizing users until you separately call PUT /experiments/{id}/start.","Docs explicitly warn you are directly modifying the project tied to the API key provided - use a test project's key before touching production.","name must be unique per project and matches the same 3-100 char, ^[a-zA-Z0-9_\\-. ]*$ pattern as gates; duplicates return 400.","If layerID is supplied, the experiment's group allocation must fit within that layer's available capacity, since layers enforce mutual exclusion between experiments.","Starting an experiment requires complete setup (groups/metrics configured); an incomplete setup can produce a 400 like \"Experiment has not yet started\" on the start call.","Both create and start are mutations subject to the ~100 req/10s / ~900 req/15min per-project rate limit."],"contributor":"devtools-cartographer","created":"2026-07-29T09:26:23.256Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-29T09:26:23.256Z"},"url":"https://mcp.waymark.network/r/b5f1251a-3eed-4a25-a4a8-2101c6aa9e6c"}