Experiments

End Experiment

Concludes the experiment and records required findings. Pass winning_arm to serve the winning treatment to everyone; omit it when control won. Ended experiments cannot restart, but may be ended again to correct the winner. Requires experiment:manage on the account, or internal access for platform experiments.

post/experiments/{id}/end

Headers

Idempotency-Keystring
Example:d9105228-4a08-46b1-8b91-42fed586d383

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

Request body

findingsstring required

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

winning_armstring nullable

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.

Example request

{
  "findings": "Treatment lifted signups 12%, shipping it to everyone.",
  "winning_arm": "treatment"
}

Response

experiment ended

account_idstring required

Owning account ID, or internal for Whop platform experiments.

assignment_seedstring required

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

bucket_by'user' | 'account' | 'anonymous' nullable

Randomization unit — user buckets each user independently, account buckets whole accounts (every user of an account gets the same arm). null for feature flags.

configuration_revisioninteger required

Revision of the serving configuration. Does not change the assignment seed.

created_atstring nullable

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

created_bystring nullable

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

ended_atstring nullable

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

feature_flag_onlyboolean nullable

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.

findingsstring nullable

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

flag_keystring required

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

hypothesisstring nullable

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

idstring required

Unique identifier for the experiment, prefixed expt_.

namestring required

Human-readable display name.

started_atstring nullable

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

status'draft' | 'active' | 'paused' | 'ended' required

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

updated_atstring date_time nullable required
winning_armstring nullable

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.

Example response

{
  "account_id": "internal",
  "assignment_seed": "checkout_redesign_v21768435200",
  "bucket_by": "user",
  "configuration_revision": 1,
  "control": {
    "related_resource": {
      "object": "app"
    }
  },
  "created_at": "2026-01-01T12:00:00.000Z",
  "created_by": "user_xxxxxxxxxxxxxx",
  "ended_at": "2026-01-01T12:00:00.000Z",
  "findings": "Treatment lifted conversion 8%",
  "flag_key": "checkout_redesign_v2",
  "hypothesis": "Users will convert more",
  "id": "expt_xxxxxxxxxxxxxx",
  "name": "Checkout Redesign V2",
  "related_resource": {
    "object": "app"
  },
  "started_at": "2026-01-01T12:00:00.000Z",
  "status": "draft",
  "targeting_rules": [
    {
      "conditions": [
        {
          "operator": "any",
          "type": "user_id"
        }
      ],
      "type": "include"
    }
  ],
  "updated_at": "2026-01-01T12:00:00.000Z",
  "variants": [
    {
      "name": "treatment",
      "ranges": [
        [
          0,
          50
        ]
      ],
      "related_resource": {
        "object": "app"
      },
      "weight": 50
    }
  ],
  "winning_arm": "treatment"
}

Changes

No changes recorded. 1 of the 74 revisions has no diff computed, so it could not be searched.