Switch a VPS to Cloud VPS billing
POST /api/v2/vps/{id}/actions/convert-to-cloud
Schedule a VPS to switch to pay-as-you-go Cloud VPS billing at the end of its current paid period. It is a billing-only conversion. The VPS keeps its disks, network settings and primary public IP. It does not restart or interrupt the server. A later CPU or RAM resize is a separate change and may need a restart. Send no body.
Check GET /api/v2/vps/{id}/actions/convert-to-cloud first. Call this only when available is true. The VPS stays on its fixed plan until effectiveAt. From then on it is billed for usage. The remaining paid time is used up first. Nothing is refunded or credited. Until effectiveAt you can cancel the switch with DELETE /api/v2/vps/{id}/actions/upgrade.
A blocked switch returns Problem Details with blockerReasons. Account and limit blockers such as not_verified, no_card_on_file or storage_limit_exceeded return 403. For a *_limit_exceeded blocker, raise the Cloud VPS limit before you try again. An unpaid invoice (has_unpaid_invoice), renewal periods that need a check by support (renewal_period_review_required) or a change that is already scheduled (scheduled_change_in_progress) return 409. When the billing state cannot be read, the call returns 503 billing_state_unavailable and nothing is scheduled.
Authentication: An API key with the scopes write:vm and read:services and write:services. About keys and scopes
Request
Path parameters
idstringrequiredvps_…).Example
curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/convert-to-cloud" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json"Responses
200 The switch is scheduled for the end of the paid period.
{ "converted": false, "scheduled": true, "effectiveAt": "2026-08-11T00:00:00.000Z", "scheduledChange": { "status": "scheduled", "effectiveAt": "2026-08-11T00:00:00.000Z", "invoiceIssueAt": "2026-07-28T00:00:00.000Z", "target": { "productSlug": "cloud-vm", "billing": { "amount": null, "currencyCode": "SEK", "billingCycle": "monthly" } }, "actions": { "canCancel": { "allowed": true, "reason": null } } }, "previousProductId": "vpsprod_01hxa3b4c5d6e7f8g9h0j1k2m3", "newProductId": "vpsprod_01hya3b4c5d6e7f8g9h0j1k2m3"}Response fields
convertedbooleanfalse. The switch happens at effectiveAt. One of false.scheduledbooleantrue. One of true.effectiveAtstring or nullscheduledChangenullpreviousProductIdstring or nullnewProductIdstring or nullErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | The account or the Cloud VPS limits block the switch. blockerReasons lists why. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is vps_not_found. |
| 409 | The switch is blocked. has_unpaid_invoice: pay the open invoice for this VPS first. renewal_period_review_required: the renewal periods need a check by support. scheduled_change_in_progress: cancel the change that is already scheduled first. A 409 with another code means the paid period could not be checked. Contact support. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |
| 503 | The billing state could not be read (billing_state_unavailable). Nothing was scheduled. Try again later. |