Skip to content

Get VPS auto-renewal setting

GET /api/v2/vps/{id}/autorenew

Says whether a VPS renews automatically and when the next payment is due. While a booked plan change handles the renewal, scheduledChangeStatus shows its state. actions.canChange is then false.

Authentication: An API key with the scope read:services. About keys and scopes

Request

Path parameters

idstringrequired
The VPS ID (vps_…).

Example

GET /api/v2/vps/{id}/autorenew
curl "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/autorenew" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

200 The auto-renewal setting.

Response 200
{
"enabled": true,
"nextDueAt": "2026-05-27T00:00:00.000Z",
"scheduledChangeStatus": null,
"actions": {
"canChange": {
"allowed": true,
"reason": null
}
}
}
Response fields
enabledboolean
True when the VPS renews automatically.
nextDueAtstring or null
When the next payment is due.
scheduledChangeStatusstring or null
State of a booked plan change that handles the renewal. Null when there is none. One of scheduled, awaiting_payment, paid, applying, applied, needs_attention, cancelling, cancelled.
actionsobject
canChangeobject
Whether POST /api/v2/vps/{id}/autorenew can change the setting now.
allowedboolean
reasonstring or null

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.
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.