Skip to main content
Treatments take stable percentage ranges of traffic and everyone else gets control, so growing an allocation never moves an existing user to another arm. Use the Experiments API to create a draft, configure its weights, targeting, and resource bindings, then activate, pause, or end it, and to evaluate which arm a user, account, or anonymous visitor gets. Managing experiments requires experiment:read or experiment:manage; evaluation works without authentication.

Endpoints

Attributes

string
required
Unique identifier for the experiment, prefixed expt_.
string
required
Owning account ID.
string
required
Assignment hashes UTF-8 seed + subject ID with CRC32 modulo 100 and selects the stored end-exclusive range.
string | null
Randomization unit — user buckets each user independently, account buckets whole accounts (every user of an account gets the same arm). null for feature flags.Available options: user, account, anonymous
integer
required
Revision of the serving configuration. Increments on every configuration change, so a cached definition with a lower revision is stale. Does not change the assignment seed.
object
required

Properties

Properties

string
required
Referenced resource tag, belonging to the experiment owner.
string
required
Available options: app, app_build, product, plan
string | null
When the experiment was created, as an ISO 8601 timestamp.
string | null
ID of the user who created the experiment, prefixed user_. null for experiments created before creators were recorded.
string | null
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.Available options: autopilot, require_approval
string | null
When the experiment stopped collecting data, as an ISO 8601 timestamp. null while still running.
string | null
What was learned and why this outcome, recorded when the experiment was ended. null until then.
string
required
Developer-chosen handle referenced from code. Anywhere the API takes an experiment identifier, the expt_ id and the flag_key are interchangeable.
string | null
Hypothesis for this experiment. null when none is set, and always null for feature flags.
string
The kind of experiment: boolean is a feature flag, experiment assigns its subjects to arms, beforeafter compares a change with the period before it.Available options: boolean, experiment, beforeafter
object
Key-value pairs attached when the experiment was created. Empty when none were set.
string
required
Human-readable display name.
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.

Properties

string
required
Referenced resource tag, belonging to the experiment owner.
string
required
Available options: app, app_build, product, plan
string | null
When the experiment began collecting data, as an ISO 8601 timestamp. null for drafts.
string
required
Lifecycle state. draft — not yet live; active — currently running; paused — traffic paused; ended — concluded.Available options: draft, active, paused, ended
object[] | null
The measures the experiment sets out to move, as the stats API reads them. null when there are none.

Properties

string
required
Which way the measure should move.Available options: up, down
number | null
required
The value the measure is expected to reach, in its own unit. null when there is no estimate.
string
required
The stats metric, the key of GET /stats/time_series/\{metric}.
object
required
The parameters of that metric beyond the account, as the stats API takes them.
string | null
required
object[]
required
Treatment arms. Users outside every arm’s allocation form the implicit control group. Weights only ever grow and arms are never removed, so a user moves from control into a treatment at most once.

Properties

string
required
Treatment identifier. control is reserved — it is the implicit remainder.
integer[][]
Granted bucket ranges (1% units, end-exclusive) recording this arm’s allocation history. Server-managed; ranges are only ever appended, which is what keeps assignments permanent.

Properties

string
required
Referenced resource tag, belonging to the experiment owner.
string
required
Available options: app, app_build, product, plan
integer
required
Percentage of all users assigned to this treatment, 1–100. All weights together sum to at most 100; the remainder is control.
string | null
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.
Experiment