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
idstringrequiredThe VPS ID (
vps_…).Body
enabledbooleanrequiredTrue to renew automatically, false to stop automatic renewal.
Example
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 }'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": true }'Responses
200 The updated auto-renewal setting.
{ "enabled": false, "nextDueAt": "2026-05-27T00:00:00.000Z", "scheduledChangeStatus": null, "actions": { "canChange": { "allowed": true, "reason": null } }}Response fields
enabledbooleanTrue when the VPS renews automatically.
nextDueAtstring or nullWhen the next payment is due.
scheduledChangeStatusstring or nullState 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.actionsobjectcanChangeobjectallowedbooleanreasonstring 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 | 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 | A booked plan change handles the renewal (scheduled_change_in_progress). Cancel that change or wait until it takes effect. |
| 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. |