API overview
The panel’s own pages use the same REST API that a billing panel, a script or your own tools call. Every permission is checked on every call, whether it comes from the panel or a token.
Base URL
https://panel.example.com/api/v1
Requests and responses are JSON. Request bodies must be sent as Content-Type: application/json, up to 1 MB.
curl https://panel.example.com/api/v1/servers \
-H "Authorization: Bearer pnl_…"
See Authentication and tokens for getting a token.
Who can call what
The same API serves three kinds of account. Each sees only what it owns:
| Account | Sees |
|---|---|
| Customer | Their own servers, and servers shared with them through team access |
| Reseller | Their own servers and their customers’ |
| Staff | Everything their role allows |
Another account’s server answers 404, not 403.
The panel also has a built-in API reference: /api-reference for customers and resellers, and /admin/api/reference for staff. It lists every call the person can use, with its parameters, a TypeScript signature and a ready-to-copy curl command.
Successful responses
200with a JSON body, or204with no body.- Long-running actions (create, power, reinstall, move…) answer at once with a job. Follow it with
GET /jobs/{jobId}until itsstateissucceededorfailed.
{ "jobId": "job_…", "serverId": "srv_8f2k1x7qm3dz", "ipv4": "203.0.113.10" }
Errors
Errors have one shape:
{
"error": {
"code": "missing_scope",
"message": "This token needs one of these permissions: servers:power.",
"details": { "scopes": ["servers:power"] }
}
}
details is only there when it has something in it. Every response carries an X-Request-Id header; quote it when reporting a problem. Staff can look a token’s call up by it under API requests.
| Status | Codes |
|---|---|
| 400 | invalid_json, invalid_request, invalid_idempotency_key |
| 401 | invalid_token, not_authenticated, invalid_password |
| 403 | forbidden, missing_scope, scope_not_allowed, token_not_allowed, ip_not_allowed, two_factor_required, csrf_failed, bad_origin, support_session, license_required, plan_not_allowed, suspended_by_provider, staff_client_area, server_suspended, … |
| 404 | not_found, server_not_found, customer_not_found, … |
| 405 | method_not_allowed |
| 409 | invalid_state, not_set_up, hostname_taken, no_capacity, no_addresses, location_closed, account_locked, name_taken, email_taken, external_id_taken, reseller_suspended, package_not_allowed, package_unavailable, location_not_allowed, location_unavailable, quota_exceeded, over_reseller_quota, snapshot_limit, license_limit, limit_reached, floating_ip, would_lock_out, delete_protected, disk_lost, server_moving, suspended_by_provider, email_recently_changed, … |
| 410 | link_expired |
| 413 | too_large |
| 415 | unsupported_media_type |
| 422 | validation_failed, limit_reached, disk_too_small, image_not_allowed |
| 423 | server_locked |
| 428 | captcha_required |
| 429 | rate_limited, webhook_busy |
| 500 | internal_error |
| 502 | node_error, agent_error, guest_agent |
| 503 | restarting, busy, new_servers_unavailable, node_unreachable |
license_required means the panel’s license needs attention: until it’s sorted, panel API keys keep what billing does for customers and staff members’ own tokens are refused (see Connecting a billing panel). new_servers_unavailable means new servers can’t be created for the same reason; existing servers aren’t affected. server_locked means staff locked the server: it keeps running, but its customer and their reseller can’t change it until it’s unlocked.
Idempotency
Send an Idempotency-Key header (1–200 characters) on every request that changes something (POST, PUT, PATCH, DELETE), and reuse it when you retry. If the first request succeeded, the retry gets the same answer instead of doing the work twice, for 24 hours.
curl -X POST https://panel.example.com/api/v1/admin/servers \
-H "Authorization: Bearer pnl_…" \
-H "Idempotency-Key: order-10482" \
-H "Content-Type: application/json" \
-d '{ … }'
- Use a new key for each distinct operation, for example the order or invoice number. A key is remembered for one caller (each token or panel API key apart, or one person’s browser sessions together) and one method and path, such as
POST /servers/srv_8f2k1x7qm3dz/actions/power. The stored answer is returned without comparing request bodies. The newest 2,000 keys are kept for each person (their sessions and personal tokens together) and for each panel API key. - Failed requests aren’t remembered and can be retried with the same key.
- A replayed answer leaves out passwords and secrets, such as a new server’s
rootPassword, which are sent only once. - It’s honored by the calls that create or change something you wouldn’t want twice: creating servers and GPU instances, self-service deploys, a reseller’s new customers, new webhooks, setup, power, reinstall, snapshots, backups and restores, rescue, root password resets, reverse DNS, package and hardware changes, extra addresses and disks, terminate, bulk server actions, moves, draining and emptying nodes, and imports. Other calls ignore the header, suspend and unsuspend included: they answer
409 invalid_statewhen the server is already in that state, andPOST /admin/customersanswers409 email_takenfor an account that already exists.
Rate limits
| What | Limit |
|---|---|
| API calls | 1200 a minute, per token (or per account, or per address) |
| Everything one person sends | 2400 a minute, their browser sessions and personal tokens together; each panel API key has only its own limit |
| Requests with a body being received at once | 32 per address (per /64 for IPv6), with up to 16 MB declared between them |
| Sign-in and password-reset calls, and calls that check a password or two-factor code | 20 a minute per address (per /64 for IPv6, and 120 per /48) |
| Requests with a token the panel doesn’t accept | 30 a minute per address (per /64 for IPv6, and 180 per /48) |
| Webhook Send test and Redeliver | 10 a minute per person |
| New private networks | 20 in 24 hours per account, deleted ones included |
| Starting, stopping and restarting a GPU instance | 30 an hour per instance for customers and resellers; staff and panel API keys aren’t limited |
/metrics |
120 a minute per token |
Every answer to a call made with an API token or panel API key carries that token’s own count:
| Header | |
|---|---|
X-RateLimit-Limit |
Calls the token can make in a minute |
X-RateLimit-Remaining |
Calls left in this minute |
X-RateLimit-Reset |
When the minute ends and the count starts again, as a Unix time in seconds |
A call refused before it’s counted (a token that isn’t valid, a missing scope, an address outside the token’s allowlist) has none of them. Signed-in browser sessions don’t get them either.
Over the limit, the API answers 429 rate_limited with a Retry-After header in seconds. While the controller restarts, changes get 503 restarting with Retry-After: 60; reads keep working. When too many large requests arrive at once, the controller answers 503 busy with Retry-After: 5.
Pagination
Lists that can be long return a page:
{ "data": [ … ], "nextCursor": "NTA=", "total": 312 }
Pass cursor (the previous page’s nextCursor) and limit. nextCursor is null on the last page. Cursors are opaque.
| List | Default | Max |
|---|---|---|
| Servers (staff) | 50 | 100 |
| Customers, reseller customers, transfers, jobs, every customer’s SSH keys and private networks (staff) | 50 | 200 |
| Every server’s backups or snapshots (staff) | 50 | 200 |
| IP pool addresses | 64 | 256 |
| A pool’s reverse DNS records | 100 | 256 |
| Audit log | 50 | 1000 |
| Webhook deliveries | 25 | 100 |