Experiments

Update Experiment

Updates the targeting rules, treatment allocation, metrics, or hypothesis of an existing experiment or feature flag. Weights and metrics can only grow, so enrolled users never change arms and an existing metric is never dropped. Lifecycle moves through the transition endpoints (activate, pause, end), never through this update. Requires the corresponding experiment permission on the owning account, or Whop internal access for internal experiments.

patch/experiments/{id}

Request body

hypothesisstring nullable

Omit to leave unchanged. Send an empty string to clear it. Not accepted on feature flags. When setting it, structure it as "If we [change] for [cohort], then [measurable behavior] will [increase/decrease], resulting in [business outcome], because [evidence]. Created by [name]." same as on create.

Example request

{
  "control": {
    "related_resource": {
      "object": "app"
    }
  },
  "hypothesis": "If we send a blueprint nudge email 30 minutes after business creation, then GTV within 10 hours will increase among newly created businesses, resulting in more new business operators generating GTV within 10 hours, because operators currently land on an empty dashboard with no concrete next step. Created by Jane Doe.",
  "related_resource": {
    "object": "app"
  },
  "targeting_rules": [
    {
      "conditions": [
        {
          "operator": "any",
          "type": "user_id"
        }
      ],
      "type": "include"
    }
  ],
  "variants": [
    {
      "name": "treatment",
      "related_resource": {
        "object": "app"
      },
      "weight": 80
    }
  ]
}

Response

metrics added

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