Renew a VPS
POST /api/v2/vps/{id}/actions/renew
Create the next renewal invoice for a VPS now, without waiting for the automatic one. Pay that invoice to renew the VPS. The VPS must be active. Send {} as the body.
When an unpaid renewal invoice already exists, the call returns 409 existing_invoice_blocking with that invoice in existingInvoice. Pay it instead. A change scheduled for the next renewal blocks the call with 409 scheduled_change_in_progress. invoiceLookupPending: true means the invoice was created but cannot be read yet. Look for it in GET /api/v2/billing/invoices shortly after.
Authentication: An API key with the scopes write:billing and write:services. About keys and scopes
Request
Path parameters
idstringrequiredvps_…).Body (optional)
addonIdsarray of string400.Example
curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/actions/renew" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json"Responses
200 The renewal invoice is created.
{ "vpsId": "vps_01hxa3b4c5d6e7f8g9h0j1k2m3", "renewalScheduled": true, "newExpiresAt": "2026-05-27T00:00:00.000Z", "billing": { "amount": 99, "currencyCode": "SEK" }, "renewalInvoice": { "id": "inv_01hxa3b4c5d6e7f8g9h0j1k2m3", "number": "10001", "amount": 99, "currencyCode": "SEK", "dueAt": "2026-05-27T00:00:00.000Z", "status": "unpaid", "paymentUrl": "/billing?invoice=10001" }}Response fields
vpsIdstringrenewalScheduledbooleantrue.newExpiresAtstring or nullbillingobjectamountnumber or nullcurrencyCodestringrenewalInvoiceobject | nullnull while it cannot be read yet.idstringnumberstring or nullamountnumber or nullcurrencyCodestringdueAtstring or nullstatusstringunpaid, paid, cancelled, refunded, collections, unknown.paymentUrlstring or nullinvoiceLookupPendingbooleantrue when the invoice was created but cannot be read yet.Errors
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 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is vps_not_found. |
| 409 | The renewal is blocked. existing_invoice_blocking: an unpaid renewal invoice already exists. scheduled_change_in_progress: a scheduled change manages the VPS. |
| 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. |