Skip to content

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

idstringrequired
The VPS ID (vps_…).

Body

enabledbooleanrequired
True to take snapshots on the schedule. False to pause it.
intervalHoursnumberrequired
Hours between two snapshots, 4 to 24. Decimals are rounded down. A value outside the range is moved to the nearest end. 4 to 24.

Example

POST /api/v2/vps/{id}/snapshot-schedules
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
}'

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.

Response 200
{
"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 null
The schedule. Null when none is set.
limitsobject
Not filled in by this call. Read the slots from the GET.
totalSnapshotsinteger
Always 0 in this response. Read the slot count from the GET.
availableboolean
Always false in this response. Read it from the GET.
reasonstring or null
Always the no-slots sentence in this response. Read it from the GET.
actionsobject
Not filled in by this call. Read the gates from the GET.
canEnableobject
Always allowed: false in this response. Read the gate from the GET.
allowedboolean
reasonstring or null
codestring or null
A machine-readable code for why the action is blocked.

Errors

Errors are Problem Details with a stable code. Branch on the code, not on the text.

400The 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[].
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 names the missing resource: vps_not_found, snapshot_schedule_not_found.
409enabled: true on a VPS without snapshot slots. code is product_not_orderable. Add slots, then try again.
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.