QoCloud REST API
Anything you can do in the control panel, you can do through the API: create a server, reboot it, reinstall the OS, renew it. JSON over HTTPS, with read-only or full-access keys.
https://qocloud.tech/api/v1Create a key under Settings → API keys and send it in the Authorization: Bearer … header. Keep it as safe as a password.
Your first request
Store the token in an environment variable and list your servers.
$ export QOCLOUD_TOKEN="qc_live_…"$ curl https://qocloud.tech/api/v1/servers -H "Authorization: Bearer $QOCLOUD_TOKEN"/catalogPlans and prices
Locations, plans with monthly prices in rubles, available operating systems, billing periods and period discounts (in percent). No key required.
$ curl -X GET https://qocloud.tech/api/v1/catalog \ -H "Authorization: Bearer $QOCLOUD_TOKEN"{ "locations": [ { "code": "nl", "name": "Нидерланды", "available": true } ], "plans": [ { "id": "2c-4g-60", "line": "start", "cpu": 2, "ram_gb": 4, "disk_gb": 60, "monthly": { "nl": 945 } } ], "os": [ "ubuntu2404", "debian12" ], "periods": [ "1m", "3m", "6m", "1y" ], "discounts": { "1m": 0, "3m": 15, "6m": 20, "1y": 25 }}/balanceBalance
Account balance, monthly spend on running servers and auto-renewal status. Scope: read.
$ curl -X GET https://qocloud.tech/api/v1/balance \ -H "Authorization: Bearer $QOCLOUD_TOKEN"{ "balance": 4820, "currency": "RUB", "monthly_spend": 6241, "auto_renew": true}/serversList servers
All servers on the account. status: provisioning, active, suspended, expired, failed; power: running or stopped. Scope: read.
$ curl -X GET https://qocloud.tech/api/v1/servers \ -H "Authorization: Bearer $QOCLOUD_TOKEN"{ "servers": [ { "id": "6f1c2a9e-8b1d-4c1e-9f7a-2d3b4c5e6f70", "name": "web-01", "status": "active", "power": "running", "plan": "2c-4g-60", "cpu": 2, "ram_gb": 4, "disk_gb": 60, "location": "nl", "os": "ubuntu2404", "ip": "203.0.113.10", "price_month": 945, "paid_until": "2026-12-02T09:00:00.000Z", "created_at": "2026-06-02T09:00:00.000Z", "last_error": null } ]}/serversCreate a server
Charges the period price to your balance (with the 3, 6 or 12 month discount) and creates the server in 1–3 minutes. Send an Idempotency-Key header: a retry with the same key within 24 hours won’t create a second server. If your balance is short, you get a 402 with a need field. Scope: manage.
| Parameter | Description |
|---|---|
planstring · required | plan id from /catalog |
locationstring · required | location code: nl, de, pl, ee |
osstring · required | image from /catalog |
periodstring · required | 1m, 3m, 6m or 1y |
namestring · required | Latin letters, digits and hyphens, 2–60 characters |
$ curl -X POST https://qocloud.tech/api/v1/servers \ -H "Authorization: Bearer $QOCLOUD_TOKEN" \ -H "Content-Type: application/json" \ -d '{"plan":"2c-4g-60","location":"nl","os":"ubuntu2404","period":"1m","name":"web-02"}'{ "server": { "id": "6f1c2a9e-8b1d-4c1e-9f7a-2d3b4c5e6f70", "name": "web-02", "status": "provisioning", "power": null, "plan": "2c-4g-60", "cpu": 2, "ram_gb": 4, "disk_gb": 60, "location": "nl", "os": "ubuntu2404", "ip": null, "price_month": 945, "paid_until": "2026-12-02T09:00:00.000Z", "created_at": "2026-06-02T09:00:00.000Z", "last_error": null }}/servers/{id}Get a server
Current server details (status is checked against the data center). Scope: read.
| Parameter | Description |
|---|---|
idstring · required | server id |
$ curl -X GET https://qocloud.tech/api/v1/servers/6f1c2a9e-8b1d-4c1e-9f7a-2d3b4c5e6f70 \ -H "Authorization: Bearer $QOCLOUD_TOKEN"{ "server": { "id": "6f1c2a9e-8b1d-4c1e-9f7a-2d3b4c5e6f70", "name": "web-01", "status": "active", "power": "running", "plan": "2c-4g-60", "cpu": 2, "ram_gb": 4, "disk_gb": 60, "location": "nl", "os": "ubuntu2404", "ip": "203.0.113.10", "price_month": 945, "paid_until": "2026-12-02T09:00:00.000Z", "created_at": "2026-06-02T09:00:00.000Z", "last_error": null }}/servers/{id}/passwordRoot password
The current root password. Every request is recorded in the security log. Scope: manage.
$ curl -X GET https://qocloud.tech/api/v1/servers/6f1c2a9e-8b1d-4c1e-9f7a-2d3b4c5e6f70/password \ -H "Authorization: Bearer $QOCLOUD_TOKEN"{ "id": "6f1c2a9e-…", "root_password": "k3P…"}/servers/{id}/eventsServer log
Who managed the server and when: the control panel (user), an API key (api, with the key name in api_key), support (admin) or automation (system). Amount: negative for a charge, positive for a refund. Newest entries first. Scope: read.
| Parameter | Description |
|---|---|
idstring · required | server id |
limitnumber | number of entries to return, 1–200 (default 100) |
$ curl -X GET https://qocloud.tech/api/v1/servers/6f1c2a9e-8b1d-4c1e-9f7a-2d3b4c5e6f70/events \ -H "Authorization: Bearer $QOCLOUD_TOKEN"{ "events": [ { "id": "0b7e…", "at": "2026-06-02T09:05:00.000Z", "action": "change_ip", "label": "Смена IP", "actor": "api", "api_key": "deploy", "ok": true, "detail": "Прежний 203.0.113.10", "amount": -150 } ]}/servers/{id}/actions/{action}Server action
start, stop, reboot, reinstall (requires os), reset-password, change-ip (paid), renew (one month from your balance), upgrade (requires plan, you pay the difference for the rest of the period). Actions run asynchronously: the API returns 202 and the status changes within seconds to minutes. Scope: manage.
| Parameter | Description |
|---|---|
actionstring · required | start, stop, reboot, reinstall, reset-password, change-ip, renew, upgrade |
osstring | reinstall only |
planstring | upgrade only |
$ curl -X POST https://qocloud.tech/api/v1/servers/6f1c2a9e-8b1d-4c1e-9f7a-2d3b4c5e6f70/actions/reinstall \ -H "Authorization: Bearer $QOCLOUD_TOKEN" \ -H "Content-Type: application/json" \ -d '{"os":"debian12"}'{ "ok": true, "action": "reinstall", "message": "Переустановка началась", "server": { "id": "6f1c2a9e-…", "status": "active", "power": "running" }}/servers/{id}Delete a server
Deletes the server and all its data. This can’t be undone. Requires an X-Confirm-Name header with the server name. The prepaid period is not refunded (see the refund policy). Scope: manage.
$ curl -X DELETE https://qocloud.tech/api/v1/servers/6f1c2a9e-8b1d-4c1e-9f7a-2d3b4c5e6f70 \ -H "Authorization: Bearer $QOCLOUD_TOKEN" \ -H "X-Confirm-Name: web-01"{ "id": "6f1c2a9e-…", "status": "deleted"}When a request fails
Error responses look like { "error": { "code", "message" } }. The code is stable, so your scripts can branch on it.
- 401
unauthorizedThe key is missing, revoked or expired. - 403
forbiddenThe key is read-only, or the account is blocked. - 400
bad_requestInvalid fields; details are in fields. - 402
insufficient_balanceNot enough balance; the missing amount is in need. - 404
not_foundServer not found (or it belongs to another account). - 409
conflictThe action isn’t possible right now: the server is being created, is stopped, and so on. - 429
rate_limited120 requests per minute per key; heavy operations are limited to 10 per 10 minutes.