Saltar al contenido principal
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.

Autorizaciones

x-api-key
string
header
requerido

Encabezados

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
predeterminado:2026-08-27

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

Parámetros de ruta

id
string
requerido

Cuerpo

application/json
code
string
requerido

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.

Rango requerido: 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.

Rango requerido: 1 <= x <= 2147483647

Respuesta

Success

id
string
requerido

Public plan experiment ID.

code
string
requerido

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>
requerido

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

Opciones disponibles:
running,
won,
archived
startedFromVersionId
string
requerido

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

latestVersionId
string
requerido

Its latest version.

sellsVersionId
string
requerido

The version its code sells to new buyers today.

subscriptionCount
integer
requerido

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

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