Skip to content

Delete a VPS backup

DELETE /api/v2/vps/{id}/backups/{backupId}

Deletes one backup of a VPS and frees its backup slot. This cannot be undone. While another operation holds the backup, the call returns 409 backup_temporarily_locked. Retry after the number of seconds in Retry-After. A backup that is already deleted, or that belongs to another VPS, returns 403 forbidden, not 404. List the backups to check whether it is gone.

Authentication: An API key with the scope backup:vm. About keys and scopes

Request

Path parameters

idstringrequired
The VPS ID (vps_…).
backupIdstringrequired
The backup ID (bkp_…) from backups[].id on GET /api/v2/vps/{id}/backups.

Example

DELETE /api/v2/vps/{id}/backups/{backupId}
curl -X DELETE "https://cloud.hostup.se/api/v2/vps/vps_01hxa3b4c5d6e7f8g9h0j1k2m3/backups/bkp_01hxa3b4c5d6e7f8g9h0j1k2m3" \
-H "Authorization: Bearer $HOSTUP_API_KEY"

Responses

204 The backup is deleted. No response body.

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.
403The key lacks backup:vm. requiredScopes then names it. The same 403 forbidden, without requiredScopes, means the backup is not a current backup of this VPS: it was deleted, or it belongs to another VPS.
404Not found. The resource does not exist or is not owned by the caller; code names the missing resource: vps_not_found, backup_not_found.
409Another operation holds the backup (backup_temporarily_locked). Retry after Retry-After seconds.
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.