Create Experiment
Creates an experiment or feature flag in draft status for an account. Nothing is served until you activate it with POST /experiments/:id/activate, which needs Economic Intelligence on for the account. Requires experiment:manage on the account.
Authorizations
An Account API key, an account access token, an account-scoped user token, or a user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.
Headers
A unique key that makes this request safe to retry. See Idempotent requests.
255"d9105228-4a08-46b1-8b91-42fed586d383"
Body
Randomization unit, and the only identity the assignment is keyed on — evaluation fails rather than falling back to another. user (default) uses subject[user_id]; account uses subject[account_id], so every user of an account gets the same arm; anonymous uses the anonymous id and survives sign-in. Fixed after creation.
user, account, anonymous "user"
How the experiment is decided. autopilot ends it as soon as a result is outside the margin of error, shipping the arm that won or keeping control if it lost. If its window passes with no clear result, autopilot keeps control. require_approval leaves every arm serving for the owner to end. Omit to leave it to the owner. Not accepted on feature flags.
autopilot, require_approval "autopilot"
Required for full experiments; rejected on feature flags. Structure it as "If we [change] for [cohort], then [measurable behavior] will [increase/decrease], resulting in [business outcome], because [evidence]. Created by [name]." Evidence should be something real — a baseline number, a funnel breakdown — not a guess, and [name] is you, not something to leave blank.
"If we show before and after detailing photos to Austin drivers, then ceramic coating bookings will increase. Customers can see the finish before choosing a package. Created by Marcus Webb."
Resource owned by the account that this experiment is bound to, such as an app or product. null when unbound. Fixed once the experiment first activates.
Response
experiment created
Resource owned by the account that this experiment is bound to, such as an app or product. null when unbound. Fixed once the experiment first activates.
How the experiment is decided. autopilot ends it as soon as a result is outside the margin of error, shipping the arm that won or keeping control if it lost. If its window passes with no clear result, autopilot keeps control. require_approval leaves every arm serving for the owner to end. null leaves it to the owner.
autopilot, require_approval "autopilot"
The treatment that won, set when the experiment was ended. Once set, every evaluation returns this arm to every caller regardless of targeting or allocation, and no further exposures are recorded. null means control won — an ended experiment with no winning arm evaluates to control for everyone. Always null for feature flags, which simply evaluate to disabled once ended.
"treatment"

