Skip to content

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

idstringrequired
The VPS ID (vps_…).

Body (optional)

addonIdsarray of string
Not supported. Leave it out or send an empty list. A non-empty list returns 400.

Example

POST /api/v2/vps/{id}/actions/renew
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.

Response 200
{
"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
vpsIdstring
The VPS ID.
renewalScheduledboolean
Always true.
newExpiresAtstring or null
The expiry date the VPS has after the call.
billingobject
The renewal price.
amountnumber or null
currencyCodestring
renewalInvoiceobject | null
The renewal invoice to pay. null while it cannot be read yet.
idstring
numberstring or null
amountnumber or null
currencyCodestring
dueAtstring or null
statusstring
One of unpaid, paid, cancelled, refunded, collections, unknown.
paymentUrlstring or null
invoiceLookupPendingboolean
Present and true 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.

400Invalid request. The response body is an RFC 7807 Problem Details document.
401Unauthorized. Authentication is required.
403Forbidden. The caller lacks a required scope or does not own the resource.
404Not found. The resource does not exist or is not owned by the caller; code is vps_not_found.
409The renewal is blocked. existing_invoice_blocking: an unpaid renewal invoice already exists. scheduled_change_in_progress: a scheduled change manages the VPS.
429Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers.
500Internal error. Retry later or contact support if the issue persists.