VPS.org API

REST API Documentation

Backups API

List your server backups, start a new backup and restore a server from one.

Endpoints 4
Base Path /api/v1/backups
GET /api/v1/backups/

List All Backups

Returns the backups of all your servers, newest first, 25 per page. There is no server filter: use server_hostname to group them.

Required permission: backups:list

Query Parameters

Parameter Type Required Description
page integer No Page number, starting at 1

Example Request

cURL
Python
JavaScript
curl -X GET "https://admin.vps.org/api/v1/backups/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
import requests

url = "https://admin.vps.org/api/v1/backups/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}

response = requests.get(url, headers=headers)
for backup in response.json()["results"]:
    print(backup["id"], backup["server_hostname"], backup["created_at"])
const response = await fetch('https://admin.vps.org/api/v1/backups/', {
  headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }
});

const data = await response.json();
console.log(data.results);

Example Response

{
  "count": 96,
  "next": "https://admin.vps.org/api/v1/backups/?page=2",
  "previous": null,
  "results": [
    {
      "id": 5512,
      "server_hostname": "web-01",
      "name": "vzdump-qemu-1042-2026_09_14-16_44_10.vma.zst",
      "size_gb": 3.12,
      "deletion_date": "2026-09-21T20:45:40.697512Z",
      "days_remaining": 6,
      "created_at": "2026-09-14T20:45:40.699494Z"
    }
  ]
}

Response Fields

Field Type Description
id integer Backup identifier, used by the get and restore endpoints
server_hostname string Hostname of the server the backup was taken from
name string Backup archive file name
size_gb number Compressed size in gigabytes
deletion_date datetime When the backup will be removed automatically
days_remaining integer Whole days left until deletion_date
created_at datetime Creation time (ISO 8601, UTC)

Response Status Codes

200 Successfully retrieved backup list
403 Missing or invalid API token, or the token lacks the required permission
GET /api/v1/backups/{id}/

Get a Backup

Returns one backup object with the fields above.

curl -X GET "https://admin.vps.org/api/v1/backups/5512/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
POST /api/v1/servers/{uuid}/backup/

Create a Backup

Queues a backup of a deployed server. No request body is needed. The backup appears in the list once it has finished, which can take several minutes depending on disk usage.

Required permission: servers:backup

cURL
Python
curl -X POST "https://admin.vps.org/api/v1/servers/8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b/backup/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
import requests

server_uuid = "8c4f2a1e-5b3d-4e6f-9a7b-1c2d3e4f5a6b"
url = f"https://admin.vps.org/api/v1/servers/{server_uuid}/backup/"
headers = {"Authorization": "Bearer YOUR_API_TOKEN"}

response = requests.post(url, headers=headers)
print(response.json())

Example Response

{
  "message": "Backup queued successfully"
}

Response Status Codes

200 The action was queued
400 The server is not deployed yet
402 No payment method on file, or unpaid invoices
404 Not found, or it belongs to another account
POST /api/v1/backups/{id}/restore/

Restore a Server from a Backup

Stops the server the backup was taken from, overwrites its disk with the backup and starts it again. No request body is needed. The server status is queue while the restore runs.

Required permission: backups:restore

curl -X POST "https://admin.vps.org/api/v1/backups/5512/restore/" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "message": "Backup restore queued. The server will be stopped, restored, and restarted.",
  "backup": "vzdump-qemu-1042-2026_09_14-16_44_10.vma.zst",
  "job_id": "b6f1c7e2-3a4d-4f5e-8b9c-0d1e2f3a4b5c"
}
Warning: Everything written to the server after the backup was taken is lost. A restore cannot be undone.

Response Status Codes

200 The action was queued
400 The server is not deployed yet
404 Not found, or it belongs to another account

Notes