Skip to content

Turn VPS auto-renewal on or off

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

Turns automatic renewal of a VPS on or off. Send enabled: true or enabled: false. While a booked plan change handles the renewal, the call returns 409 scheduled_change_in_progress. Cancel that change or wait until it takes effect. The response is the updated setting with the next due date.

Authentication: An API key with the scopes write:vm and write:services. About keys and scopes

Request

Path parameters

idstringrequired
The VPS ID (vps_…).

Body

enabledbooleanrequired
True to renew automatically, false to stop automatic renewal.

Example

POST /api/v2/vps/{id}/autorenew
curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/autorenew" \
-H "Authorization: Bearer $HOSTUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": false
}'

Responses

200 The updated auto-renewal setting.

Response 200
{
"enabled": false,
"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
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.
409A booked plan change handles the renewal (scheduled_change_in_progress). Cancel that change or wait until it takes effect.
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.