Set the snapshot schedule of a VPS
POST /api/v2/vps/{id}/snapshot-schedules
Turns on, changes or pauses the automatic snapshot schedule of a VPS. The call replaces the whole schedule. Send both fields every time. Check actions.canEnable on GET /api/v2/vps/{id}/snapshot-schedules first. Turning it on needs at least one snapshot slot (limits.totalSnapshots). Without one the call returns 409 product_not_orderable. Add slots with resources.snapshotSlots on POST /api/v2/vps/{id}/actions/config. Each run takes a snapshot on the VPS’s own storage. It is not an offsite backup. Snapshots are deleted 24 hours after they are taken. A run is skipped while every slot is in use. enabled: false keeps the settings and stops the runs. Existing snapshots stay until they expire or you delete them.
Authentication: An API key with the scope write:vm. About keys and scopes
Request
Path parameters
idstringrequiredvps_…).Body
enabledbooleanrequiredintervalHoursnumberrequiredExample
curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/snapshot-schedules" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "enabled": true, "intervalHours": 12 }'curl -X POST "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/snapshot-schedules" \ -H "Authorization: Bearer $HOSTUP_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "enabled": false, "intervalHours": 12 }'Responses
200 The saved schedule. In this response limits.totalSnapshots is always 0. available and actions.canEnable.allowed are always false, even when the VPS has snapshot slots. Read them from GET /api/v2/vps/{id}/snapshot-schedules.
{ "schedule": { "enabled": true, "intervalHours": 12, "lastRun": "2026-04-27T00:00:00.000Z", "nextRun": "2026-04-27T12:00:00.000Z" }, "limits": { "totalSnapshots": 0 }, "available": false, "reason": "Snapshots are not available on your current plan.", "actions": { "canEnable": { "allowed": false, "reason": "Snapshots are not available on your current plan." } }}Response fields
scheduleobject or nulllimitsobjecttotalSnapshotsinteger0 in this response. Read the slot count from the GET.availablebooleanreasonstring or nullactionsobjectcanEnableobjectallowed: false in this response. Read the gate from the GET.allowedbooleanreasonstring or nullcodestring or nullErrors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | The body is not valid. A field is missing or has the wrong type. Or the body has a field other than enabled and intervalHours. There is no errors[]. |
| 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 names the missing resource: vps_not_found, snapshot_schedule_not_found. |
| 409 | enabled: true on a VPS without snapshot slots. code is product_not_orderable. Add slots, then try again. |
| 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. |