Subscriptions

Migrate subscription

Migrates a running subscription to a later version of its current plan. If startingPhase is omitted and billingAnchor is omitted or unchanged, the subscription is amended in place. Unchanged items retain their service periods. Changed or removed items end at the effective time; replacements and additions start from that time. For in-place migrations, existing addons must be compatible with the target plan version. The phase timeline, billing anchor, and subscription-level billing settings are preserved. Both response entries refer to the same subscription: current is the before snapshot and next is the amended view. Providing startingPhase or a different billingAnchor uses subscription change: the current subscription ends and a replacement starts at the effective time. This resets the phase timeline and can produce billing adjustments. Addons are not transferred to the replacement.

post/api/v1/subscriptions/{subscriptionId}/migrate

Request

  • Base URL
    https://openmeter.cloud (the document declares no server; this is the origin it was published from)
  • Auth
    • HTTP bearer
    • or API key in cookie __session

Path parameters

subscriptionIdstring required
Example:01G65Z755AFWAKHE12NY0CQ9FH

Request body

billingAnchorstring date-time

The anchor used with the plan's billing cadence to calculate billing periods. If startingPhase is omitted and this anchor is omitted or equal to the existing one, migration preserves the current subscription. Providing a different anchor ends the current subscription and creates a replacement. The supplied anchor is preserved; it may be before or after the replacement's start time.

startingPhasestring

Explicitly replace the subscription, starting in this target plan phase. Providing this field always selects replacement, even if the phase matches the current one. Replacement may produce billing adjustments and does not transfer addons. Omit it to migrate in place; incompatible phase timelines then return an error.

targetVersioninteger

A strictly later version of the current plan to migrate to. If not provided, the subscription will migrate to the latest version of the current plan.

Example request

{
  "billingAnchor": "2023-01-01T01:01:01.001Z",
  "timing": "2023-01-01T01:01:01.001Z"
}

Response

The request has succeeded.

Changes

No recorded changes to this operation across all 2 revisions of this API.