Skip to main content
POST
cURL
Queues a move for each subscriber the migration can move, and records the rest as skipped. Ledger then moves them one at a time: read the migration to follow its progress. Each subscriber is checked again when their move is made, so one whose state changed since the preview is skipped then. Send an Idempotency-Key. The same key again returns the migration unchanged; once a migration runs, another key is refused with 409 idempotency_key_mismatch. Needs the Billing permission at Write.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

idempotency-key
string
required

Identifies this one run. Reuse it on every retry; a migration that already runs refuses another key.

Required string length: 1 - 255

Path Parameters

id
string
required

The plan's ID.

Required string length: 1 - 100
Pattern: ^[a-zA-Z0-9_-]+$
migrationId
integer
required

The migration's ID, from its preview.

Response

The migration, running

migrationId
integer
required
planId
string
required
fromVersion
integer | null
required
toVersion
integer | null
required
timing
enum<string>
required
Available options:
now,
at_renewal
status
enum<string>
required

draft: a preview; nothing has moved. running: its moves are queued and being applied. done: every move has been made or scheduled for its renewal.

Available options:
draft,
running,
done
customers
integer
required

Subscribers who move: the preview's count while a draft, the queued moves once it runs.

Required range: x >= 0
byChange
object
required

How the moving subscribers' price changes.

progress
object
required

The moves' state once it runs.

skipped
object[]
required

Subscribers left on their version, and why.