Skip to main content
POST
Publish plan draft
Publish a draft as the plan’s current version, as a new experiment with its own code, or as the next version of the experiment it started from. A country missing a price, or removing the signup trial of the plan’s group from the current version, stops the publication. With move, subscribers of earlier versions move at their renewal or now; if any of them does not fit the new version, nothing is published and the response lists each one with what would make it fit, to send back in changes. Subscribers whose status does not allow a move, such as paused ones, stay where they are. A move keeps each subscriber’s currency. Send preview to check without publishing. Starting an experiment moves nobody. Publishing with move: "keep" leaves every earlier subscriber on its version; move them later with Move subscribers to a plan version.

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
draftId
string
required

Body

application/json
publishAs
string
required

current sells the draft to every new buyer.

Allowed value: "current"
move
enum<string>
default:keep

What happens to subscribers of earlier versions: keep them, move them at their next renewal, or move them now (features and balance change today, the price at renewal). Nobody moves unless every one of them fits or has a change below.

Available options:
keep,
period_end,
now
changes
object[]

Per-subscriber changes that make each one fit, applied at its renewal.

preview
boolean
default:false

Check everything without publishing.

Response

Success

preview
boolean
required
version
object | null
required

The published version. Null for a preview.

moveId
string | null
required

The move of subscribers, if any.

subscribers
object | null
required
object
string
required
Allowed value: "plan_draft_publication"
livemode
boolean
required