Change VPS plan (resize / convert)
change_planSwitch a VPS to another plan IN PLACE — files and the OS are kept; the server reboots once (~1 min). target_plan = product_id from get_upgrade_options. The prorated difference is charged from the prepaid balance right away (402 with needed/balance if it is short — top up and retry); convert_to_nat refunds the unused difference to the balance. The next renewal uses the new price. Same function as the cabinet's Upgrade panel. If the server's host has no free room (or no free IPv4 for NAT → IP) right now, the response is 202 with queued: true: the difference is charged now and the upgrade is applied automatically from the queue, usually within 24 hours — the server reboots once at that moment and keeps running on the current plan until then; a second change_plan meanwhile returns 409 upgrade_queued. The response shows charged, unused_credit (unused time of the old plan, counted) and new_cost. Set confirm: true. Requires: token + balance for the prorated difference + confirm: true. No room on the server's host → 202 queued (paid, applied automatically, usually within 24 hours). Typical errors: 402 (top up), 409 upgrade_queued (one upgrade is already paid and waiting), 422 not an upgrade (pick from get_upgrade_options).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | Yes | Required. Must be true — you agree to the charge and one reboot. | |
| service_id | No | Optional. Service code as returned by list_vps/order_vps, e.g. "68J67T5" (a plain numeric id is also accepted). | |
| target_plan | Yes | Required. Target plan `product_id` from get_upgrade_options `options[]`, integer, e.g. 11. |