Skip to main content
POST
Create plan experiment
Start an experiment from the plan’s current version with the changes given. It is sold only through its own code, sent as planCode after the plan’s code; new buyers of the plan keep getting the current version. Sell it by creating subscriptions with planCode set to <plan code>:<experiment code>. The experiment code is never reused in the plan.

Authorizations

x-api-key
string
header
required

Headers

Idempotency-Key
string

Unique key used to safely retry this write for 24 hours without applying it twice.

Required string length: 1 - 200
Commet-Version
string
default:2026-08-27

API version used by this reference. Send this header to select this contract explicitly.

Path Parameters

id
string
required

Body

application/json
code
string
required

The experiment's own code: lowercase letters, numbers, hyphens and underscores. It is sold as planCode <plan code>:<code> and is never reused in the plan.

prices
object[]
currencies
object[]

Currencies the current version does not sell, with the exchange rate (local units per USD) used for the amounts not listed, credit purchases, add-ons and overage.

maxPlanCredits
integer | null

Credits plans that roll over unused credits: the most plan credits a subscription can hold. Null removes the cap.

Required range: 1 <= x <= 2147483647
maxPlanBalance
integer | null

Balance plans that roll over unused balance: the most plan balance a subscription can hold, in USD cents. Other currencies convert it with the plan's exchange rate unless the dashboard sets a custom amount for that currency. Null removes the cap.

Required range: 1 <= x <= 2147483647

Response

Success

id
string
required

Public plan experiment ID.

code
string
required

The code to sell it with as planCode, such as pro:price-test. It always sells the experiment's latest version while running, and the plan's current version once closed.

status
enum<string>
required

running sells its latest version; won became the plan's current version; archived stopped selling.

Available options:
running,
won,
archived
startedFromVersionId
string
required

The plan's version that was current when it started.

latestVersionId
string
required

Its latest version.

sellsVersionId
string
required

The version its code sells to new buyers today.

subscriptionCount
integer
required

Active, trialing, past due and paused subscriptions on its versions.

Required range: -9007199254740991 <= x <= 9007199254740991
createdAt
string<date-time>
required
closedAt
string<date-time> | null
required
object
string
required
Allowed value: "plan_experiment"
livemode
boolean
required