Skip to main content
POST
End Experiment

Autorizaciones

Authorization
string
header
requerido

An Account API key, an App 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.

Encabezados

Idempotency-Key
string

A unique key that makes this request safe to retry. See Idempotent requests.

Maximum string length: 255
Ejemplo:

"d9105228-4a08-46b1-8b91-42fed586d383"

Api-Version-Date
string

Pins the request to a dated API version.

Ejemplo:

"2026-11-17"

Parámetros de ruta

id
string
requerido

The experiment identifier — the expt_ id or the flag_key handle.

Parámetros de consulta

account_id
string

Owning account ID. Required when id is a flag key; optional for an expt_ ID.

Cuerpo

application/json
findings
string
requerido

What you learned and why you chose this outcome. Required.

Ejemplo:

"Treatment lifted signups 12%, shipping it to everyone."

winning_arm
string | null

The treatment that won. Setting it rolls that arm out: every later evaluation returns it to every caller, ignoring targeting and allocation, and exposures stop being recorded. Omit it when control won — an ended experiment with no winning arm evaluates to control for everyone, so ending again without one also reverts a rollout recorded by mistake. Not accepted on feature flags, which evaluate to disabled once ended.

Ejemplo:

"treatment"

Respuesta

experiment ended

account_id
string
requerido

Owning account ID.

Ejemplo:

"biz_xxxxxxxxxxxxxx"

assignment_seed
string
requerido

Assignment hashes UTF-8 seed + subject ID with CRC32 modulo 100 and selects the stored end-exclusive range.

Ejemplo:

"checkout_redesign_v21768435200"

configuration_revision
integer
requerido

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.

Ejemplo:

1

control
object
requerido
flag_key
string
requerido

Developer-chosen handle referenced from code. Anywhere the API takes an experiment identifier, the expt_ id and the flag_key are interchangeable.

Ejemplo:

"checkout_redesign_v2"

id
string
requerido

Unique identifier for the experiment, prefixed expt_.

Ejemplo:

"expt_xxxxxxxxxxxxxx"

name
string
requerido

Human-readable display name.

Ejemplo:

"Checkout Redesign V2"

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.

status
enum<string>
requerido

Lifecycle state. draft — not yet live; active — currently running; paused — traffic paused; ended — concluded.

Opciones disponibles:
draft,
active,
paused,
ended
Ejemplo:

"draft"

updated_at
string<date_time> | null
requerido
Ejemplo:

"2026-01-01T12:00:00.000Z"

variants
object[]
requerido

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.

bucket_by
enum<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.

Opciones disponibles:
user,
account,
anonymous
Ejemplo:

"user"

created_at
string | null

When the experiment was created, as an ISO 8601 timestamp.

Ejemplo:

"2026-01-01T12:00:00.000Z"

created_by
string | null

ID of the user who created the experiment, prefixed user_. null for experiments created before creators were recorded.

Ejemplo:

"user_xxxxxxxxxxxxxx"

ended_at
string | null

When the experiment stopped collecting data, as an ISO 8601 timestamp. null while still running.

Ejemplo:

"2026-01-01T12:00:00.000Z"

findings
string | null

What was learned and why this outcome, recorded when the experiment was ended. null until then.

Ejemplo:

"Treatment lifted conversion 8%"

hypothesis
string | null

Hypothesis for this experiment. null when none is set, and always null for feature flags.

Ejemplo:

"Users will convert more"

metadata
object

Key-value pairs attached when the experiment was created. Empty when none were set.

Ejemplo:
started_at
string | null

When the experiment began collecting data, as an ISO 8601 timestamp. null for drafts.

Ejemplo:

"2026-01-01T12:00:00.000Z"

winning_arm
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.

Ejemplo:

"treatment"