API reference
REST API for programmatic access to ServersCamp infrastructure. Manage VMs, storage, networks, and more.
Overview
The ServersCamp API is a RESTful API that allows you to manage your cloud infrastructure programmatically.
Base URL
https://platform.serverscamp.com/api/v1
Request format
All requests should include:
Content-Type: application/jsonfor requests with bodyAuthorization: Bearer <token>header
Response format
All responses are JSON. Successful responses return the requested data directly. Errors return an object with detail field.
Authentication
All API requests require authentication using an API token. Tokens are prefixed with sc_.
Getting an API token
Make API tokens in the Cloud Panel under Settings, API tokens.
Using your token
Include the token in the Authorization header:
curl -X GET "https://platform.serverscamp.com/api/v1/vms" \
-H "Authorization: Bearer sc_your_token_here"
import requests
API_TOKEN = "sc_your_token_here"
BASE_URL = "https://platform.serverscamp.com/api/v1"
headers = {"Authorization": f"Bearer {API_TOKEN}"}
response = requests.get(f"{BASE_URL}/vms", headers=headers)
vms = response.json()
Error handling
The API uses standard HTTP status codes:
| Code | Meaning |
|---|---|
200 | Success |
201 | Created |
400 | Bad Request - Invalid parameters |
401 | Unauthorized - Invalid or missing token |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn't exist |
422 | Validation Error - Check request body |
500 | Server Error - Contact support |
Error response
{"detail": "VM not found"}
Virtual machines
Create and manage virtual machine instances.
List VMs
curl -X GET "https://platform.serverscamp.com/api/v1/vms" \
-H "Authorization: Bearer $API_TOKEN"
Response
[
{
"uuid": "06837545-c878-443b-a114-ddab3b8c6e90",
"display_name": "web-server-01",
"state": "running",
"vm_class": {"name": "bs-burst-xs", "cpu_cores": 1, "ram_mb": 1024},
"disk_gb": 20,
"internal_ip": "172.31.106.70",
"public_ipv4": "194.110.174.102"
}
]
Create VM
| Parameter | Type | Description |
|---|---|---|
display_name | string | Optional. Human-readable name |
vm_class_id | integer | Required. VM class ID from GET /vm-classes (hardware generation, profile, vCPU, RAM) |
storage_class_id | integer | Required. Disk class ID from GET /storage-classes |
vm_template_id | integer | Required. OS template from GET /vm-templates |
network_uuid | string | Required. Network UUID to attach the VM to |
disk_gb | integer | Required. Root disk size in GB (bounds depend on the disk class) |
ssh_key_id | integer | Optional. SSH key for access |
assign_public_ips | boolean | Optional. Assign public IPv4/IPv6 |
curl -X POST "https://platform.serverscamp.com/api/v1/vms" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"display_name": "web-server",
"vm_class_id": 2,
"vm_template_id": 1,
"storage_class_id": 12,
"network_uuid": "8f14e45f-...-net",
"disk_gb": 25,
"ssh_key_id": 7,
"assign_public_ips": true
}'
Get VM details
Delete VM
Control VM power
Body: {"action": "start"}. Available actions: start, shutdown, destroy, reboot, reset
Simple VPS
Create and manage Simple VPS: servers on a fixed monthly plan with their own IPv4 and IPv6 /56. Everything the Cloud Panel does with a VPS goes through these endpoints. A VPS is billed by the hour from the account balance.
List plans
curl "https://platform.serverscamp.com/api/v1/vps/plans" \
-H "Authorization: Bearer $API_TOKEN"
Response
{"items": [
{"id": "vps-std-1g", "name": "vps-std-1g", "vcpu": 1, "cpu_limit": null, "ram_gb": 1.0, "disk_gb": 20,
"traffic_gb": 1000, "net_mbit": 1000, "disk_iops": 10000, "disk_mbps": 250,
"price_monthly": 1.5, "backup_share": 0.2}
]}
cpu_limit is set on plans with less than one full core. traffic_gb is the monthly outbound quota; after it the port runs at 100 Mbit/s until the next month. Daily backups add backup_share of the plan price.
Plans in stock
curl "https://platform.serverscamp.com/api/v1/vps/stock" \
-H "Authorization: Bearer $API_TOKEN"
Response
{"items": {"vps-std-768m": "in", "vps-std-1g": "in", "vps-std-16g": "low", "vps-std-32g": "out"}}
VPS runs on capacity we have free. out means a create with that plan gets 409 right now.
List images
curl "https://platform.serverscamp.com/api/v1/vps/images" \
-H "Authorization: Bearer $API_TOKEN"
Response
{"items": [
{"id": "ubuntu-26.04", "os": "Ubuntu", "version": "26.04 LTS"},
{"id": "debian-13", "os": "Debian", "version": "13"},
{"id": "rocky-10", "os": "Rocky Linux", "version": "10"},
{"id": "almalinux-10", "os": "AlmaLinux", "version": "10"}
]}
Create a VPS
name is 3 to 24 lowercase letters, digits and hyphens, starting with a letter. The server's hostname, DNS name and reverse DNS are made from it with a random suffix, for example web-1-a1b2c3.vm.scamp.pro. Give ssh_key_ids from SSH keys, a root password of at least 8 characters, or both. backups turns on daily backups from the start.
curl -X POST "https://platform.serverscamp.com/api/v1/vps" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "web-1", "plan_id": "vps-std-1g", "image": "ubuntu-26.04", "ssh_key_ids": [42], "backups": false}'
Response
{"vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b", "status": "queued",
"hostname": "web-1-a1b2c3.vm.scamp.pro", "ipv4": "185.236.9.61", "ipv6_prefix": "2a01:ea05:0:f00::/56"}
The server is usually running in about a minute. Poll Get a VPS until status is running.
List VPS
curl "https://platform.serverscamp.com/api/v1/vps" \
-H "Authorization: Bearer $API_TOKEN"
Returns {"items": [...]}, each item as in Get a VPS.
Get a VPS
curl "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID" \
-H "Authorization: Bearer $API_TOKEN"
Response
{"vps_uuid": "12d46f8c-d66e-4163-99aa-1245d5b06e5b", "name": "web-1", "plan_id": "vps-std-1g",
"image": "ubuntu-26.04", "backups": false, "status": "running",
"ipv4": "185.236.9.61", "ipv6_prefix": "2a01:ea05:0:f00::/56",
"ptr": "web-1-a1b2c3.vm.scamp.pro", "ptr_custom": false,
"traffic": {"month": "2026-10", "out_bytes": 1830000000, "in_bytes": 920000000},
"net_capped": false, "created_at": "2026-10-23T08:12:40+00:00"}
status is one of queued, cloning, configuring, starting, running, stopped, restoring, reinstalling, deleting, unpaid (stopped when the balance ran out) or error. traffic counts this calendar month (UTC); out_bytes counts against the plan quota, inbound is free. net_capped is true while the port is at 100 Mbit/s after the quota.
Start, stop and reboot
curl -X POST "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/action" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"action": "reboot"}'
| action | What it does |
|---|---|
start | Boots a stopped server |
shutdown | Asks the system to stop |
stop | Powers off at once |
reboot | Asks the system to restart |
reset | Restarts at once |
Metrics
curl "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/metrics?timeframe=hour" \
-H "Authorization: Bearer $API_TOKEN"
Response
{"timeframe": "hour", "points": [
{"t": 1792656000, "cpu": 0.0312, "mem": 412311552, "maxmem": 805306368,
"netin": 1843.2, "netout": 9216.5, "diskread": 0.0, "diskwrite": 40960.0,
"pressurecpusome": 0.41, "pressurecpufull": 0.0, "pressurememorysome": 0.0,
"pressurememoryfull": 0.0, "pressureiosome": 0.12, "pressureiofull": 0.05}
]}
timeframe is hour, day or week. The figures are taken on the host side and averaged over each point.
| Field | Meaning |
|---|---|
t | Unix time of the point |
cpu | Share of all the server's vCPUs in use, 0 to 1 |
mem, maxmem | Memory the server takes and its plan memory, bytes |
netin, netout | Traffic into and out of the server, bytes a second |
diskread, diskwrite | Disk reads and writes, bytes a second |
pressure*some, pressure*full | Share of time some or all programs waited for CPU, memory or disk, percent |
A point is null where the server was off. A new server has no history before it was created.
Turn backups on or off
curl -X POST "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/backups" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'
A backup is taken every night at a time of its own, and the last 5 are kept. Turning backups off deletes every backup of the server.
List backups
curl "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/backups" \
-H "Authorization: Bearer $API_TOKEN"
Response
{"enabled": true, "keep": 5, "next": 1792628220,
"job": {"kind": "backup", "started": 1792656120, "pct": 45},
"items": [{"id": "bk-3f9a1c0d2e4b5a69", "created": 1792541820, "size": 1287651328, "manual": false}]}
next is when the next daily backup starts. job is the backup or restore running now with how far it got, or null.
Back up now
curl -X POST "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/backup" \
-H "Authorization: Bearer $API_TOKEN"
One backup runs at a time and three a day. Manual backups count toward the 5 that are kept.
Restore a backup
curl -X POST "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/restore" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"backup_id": "bk-3f9a1c0d2e4b5a69"}'
Puts the whole disk back and starts the server. Its status is restoring until then.
Delete a backup
curl -X POST "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/backups/delete" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"backup_id": "bk-3f9a1c0d2e4b5a69"}'
Reinstall
curl -X POST "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/reinstall" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"image": "debian-13", "ssh_key_ids": [42]}'
A fresh disk with the image you give. The addresses, names and backups stay. Give password as well or instead of keys.
Change the plan
curl -X POST "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/plan" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"plan_id": "vps-std-2g"}'
Moves the server to a bigger plan. It restarts, and the disk grows; a disk cannot shrink, so only plans with at least the same disk are accepted.
Reverse DNS
curl -X POST "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID/ptr" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"hostname": "mail.example.com"}'
Sets the reverse DNS of the IPv4 and of the first IPv6 address. An empty hostname goes back to the default name. Names under our own domains are not accepted.
Account summary
curl "https://platform.serverscamp.com/api/v1/vps/summary" \
-H "Authorization: Bearer $API_TOKEN"
Response
{"paid_balance_eur": 42.5, "runway_days": 283, "hourly_eur": 0.0063, "monthly_eur": 4.5,
"backups_on": 1, "vcpu": 3, "ram_gb": 3.0, "disk_gb": 60}
What all your VPS cost together and how long the balance lasts at that rate.
Delete a VPS
curl -X DELETE "https://platform.serverscamp.com/api/v1/vps/$VPS_UUID" \
-H "Authorization: Bearer $API_TOKEN"
Deletes the server, its disk and its backups. Billing stops at once; the server shows as deleting until the host has removed it.
Errors
| Code | When |
|---|---|
400 | A name, image, plan, action or password that is not accepted |
402 | The balance does not cover the first month of the plan |
403 | The VPS limit of the account is reached; request more on the Limits page |
404 | No such VPS or backup in your account |
409 | The plan is out of stock, or the server is busy with another task or a backup |
429 | Three manual backups were already taken in the last 24 hours |
Networking
List networks
Create network
| Parameter | Type | Description |
|---|---|---|
display_name | string | Optional. Network name |
cidr | string | Required. IP range (e.g., 10.0.0.0/24) |
List routers
Create router
Attach network to router
Body: {"router_uuid": "..."}. Detach with DELETE /network/{network_uuid}/detach.
SSH keys
List SSH keys
Create SSH key
| Parameter | Type | Description |
|---|---|---|
name | string | Required. Key name |
public_key | string | Required. SSH public key content |