Skip to main content
POST
Plan Versions and Migrations
Base URL: https://api.nozle.app/core/api/v1. Auth: secret key only. A publishable key gets 403 secret_key_required. A change to what a plan bills or grants, made while customers pay for it, saves the plan’s next version under the same code. Existing subscribers stay on the version they are on; new subscriptions get the current version. These endpoints read the versions and move subscribers between them. See Plan versioning for how versions are made and sold.

List the versions of a plan

Oldest first. Read one version in full with GET /plans/pro?version=1. Without version, or with a publishable key, GET /plans/{code} returns the current version.

Subscribe to an older version

plan_version is optional; without it the subscription gets the current version. The Engine’s POST /subscribe takes the same field.

Preview a migration

to_version is optional and defaults to the current version. Nothing is written.

Start a migration

It returns 200 with status: "running"; the migration then works through the subscriptions in the background. Each subscription that can move is scheduled to move at the end of its current billing period, like a scheduled downgrade. Nothing is invoiced, credited or refunded when it runs; the subscription’s next invoice bills the new version, and usage of the period that ended is billed at the old version’s rates.

Follow, list and cancel

GET /plans/pro/version-migrations/{id} returns the migration with one item per subscription:
GET /plans/pro/version-migrations lists the code’s migrations, newest first, without items. POST /plans/pro/version-migrations/{id}/cancel stops the migration and unschedules every move that has not happened; those subscribers stay on their version. The skip reasons are listed in Plan versioning.
A migration never charges anyone when it runs, and a move never makes a credit note. Each subscriber pays the old version for the period they already paid for, then the new version from their next period.