Migrate subscription
Changed onPre-release Endpoint This endpoint is currently in beta and is subject to change.
Migrates to a later version of the current plan. With starting_phase omitted and billing_anchor omitted or unchanged, migration amends the subscription in place: unchanged items retain their service periods and both response entries have the same ID. Existing addons must remain compatible with the target plan. Incompatible phase timelines or billing settings return an error. Providing starting_phase or a different billing_anchor explicitly requests replacement, which resets the phase timeline, may produce billing adjustments, and does not transfer addons. Custom subscriptions cannot be migrated.
Request
- Base URLhttps://global.api.konghq.com
- Auth
- HTTP bearer
- or HTTP bearer
- or HTTP bearer
- or HTTP bearer
Path parameters
ULID (Universally Unique Lexicographically Sortable Identifier).
Request body
Request for migrating to a later version of the subscription's current plan.
When the migration takes effect: immediately (default), at the next billing cycle, or at an explicit billing-aligned timestamp. In-place migrations may target a later phase when the phase timelines match. The target plan reference is saved now; changed items take effect at the requested time.
A strictly later version of the current plan. Omit to use its latest version.
Explicitly replace the subscription, starting in this target plan phase. Always selects replacement, even when the phase matches the current one. Replacement may produce billing adjustments and does not transfer addons.
Providing a different billing anchor explicitly replaces the subscription. The supplied anchor is preserved and may be before or after the replacement's start time. Omit to retain the existing anchor.
Example request
{
"timing": "2023-01-01T01:01:01.001Z",
"billing_anchor": "2023-01-01T01:01:01.001Z"
}Response
The request has succeeded.
Response for migrating a subscription.
The original subscription's own fields returned by the migration. For an in-place migration this is the before snapshot; for replacement it includes the cancellation. Does not include phases or the current billing period.
The resulting subscription, including its phases and items.
Example response
{
"current": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"labels": {
"env": "test"
},
"created_at": "2023-01-01T01:01:01.001Z",
"updated_at": "2023-01-01T01:01:01.001Z",
"deleted_at": "2023-01-01T01:01:01.001Z",
"active_from": "2023-01-01T01:01:01.001Z",
"active_to": "2023-01-01T01:01:01.001Z",
"customer_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"plan_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"plan": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"key": "resource_key"
},
"invoice_currency": "USD",
"cost_basis_pins": [
{
"custom_currency_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"invoice_currency": "USD",
"cost_basis_id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
],
"billing_cadence": "P1Y",
"billing_anchor": "2023-01-01T01:01:01.001Z"
},
"next": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"labels": {
"env": "test"
},
"created_at": "2023-01-01T01:01:01.001Z",
"updated_at": "2023-01-01T01:01:01.001Z",
"deleted_at": "2023-01-01T01:01:01.001Z",
"active_from": "2023-01-01T01:01:01.001Z",
"active_to": "2023-01-01T01:01:01.001Z",
"customer_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"plan_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"plan": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"key": "resource_key"
},
"invoice_currency": "USD",
"cost_basis_pins": [
{
"custom_currency_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"invoice_currency": "USD",
"cost_basis_id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
],
"billing_cadence": "P1Y",
"billing_anchor": "2023-01-01T01:01:01.001Z",
"current_period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"phases": [
{
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"labels": {
"env": "test"
},
"created_at": "2023-01-01T01:01:01.001Z",
"updated_at": "2023-01-01T01:01:01.001Z",
"deleted_at": "2023-01-01T01:01:01.001Z",
"key": "resource_key",
"active_from": "2023-01-01T01:01:01.001Z",
"active_to": "2023-01-01T01:01:01.001Z",
"items": [
{
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"active_from": "2023-01-01T01:01:01.001Z",
"active_to": "2023-01-01T01:01:01.001Z",
"rate_card": {
"labels": {
"env": "test"
},
"key": "resource_key",
"feature": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
},
"currency": "USD",
"billing_cadence": "P1Y",
"tax_config": {
"code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"entitlement": {
"usage_period": "P1Y"
}
}
}
]
}
]
}
}Changes
- breaking
added to the
invalid_parameters/itemsresponse propertyoneOflist for the response status - warning
added the new
key_invalidenum value to theinvalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/ruleresponse property for the response status - warning
added the new
uniqueenum value to theinvalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/ruleresponse property for the response status
- breaking