Skip to main content
An Experiment is a feature flag or A/B test owned by an account. 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
When the experiment stopped collecting data, as an ISO 8601 timestamp. null while still running.
boolean | null
true when this was created as a feature flag rather than a full experiment. Feature flags share the same evaluation API but do not collect metric results.
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
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[]
required
Rules gating who is in the experiment at all. Conditions within a rule are AND-ed, rules are OR-ed, and exclude rules always win. Empty means everyone qualifies.

Properties

object[]
required
Conditions within this rule, all of which must match.

Properties

string | null
Property name to read from the user context. Present when type is property.
string
required
Comparison to apply.Available options: any, none, eq, neq, gt, gte, lt, lte
string
required
What the condition matches on: the user ID, the account ID, or a named user property.Available options: user_id, account_id, property
string
required
Value or list of values to match against.
string
include — users matching this rule qualify; exclude — users matching this rule are always excluded, overriding any include rule.Available options: include, exclude
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