First-time customers who apply the following discount code will receive 10% off their total bill: 7JBX3GE4
API Documentation
Run your whole fleet from code
Everything the control panel does, your scripts can do faster. Create servers, take snapshots, open a firewall port, pull live usage — one bearer token, plain JSON, no XML, no surprises.
All requests go over HTTPS. Plain HTTP is refused, not redirected — we would rather fail loudly than send your token in the clear.
An API we actually use ourselves
This is not a bolted-on checkbox. Every button in the PyloraCloud control panel calls the same endpoints you are reading about, so there is no second-class path and no feature that only exists in the UI. If you can click it, you can script it.
Provision in one call
Pick a plan, a region and an image, and get a server back with an IP address. Most instances are reachable in under a minute.
Resize without rebuild
Change CPU, RAM or NVMe storage on a running instance. Your data stays where it is and you only pay the difference.
Snapshot on a schedule
Trigger a snapshot from cron before a risky deploy, roll back from the API if the deploy goes sideways at 2 a.m.
Pull live metrics
CPU, RAM, disk and network throughput as JSON, ready for your own dashboard, alerting, or a spreadsheet you send to a client.
Three moves from token to running server
Copy these in order and you will have a live VPS before the coffee cools. Nothing here is pseudo-code — it is the real shape of the requests.
Issue a token
In the panel, open Settings → API and create a key. Give it a name you will recognise in a log file, and scope it to the least it needs.
Export it safely
Keep the token in an environment variable or a secret manager. Never commit it, never paste it into a screenshot, never put it in a URL.
Make the call
Send one authenticated request to list your instances. If JSON comes back, everything after that is the same pattern.
# Store the token once, for this shell session only export PYLORA_TOKEN="ply_live_0f4c9a2b7e1d4a86" # Confirm it works before writing anything else curl -s https://api.pyloracloud.asia/v1/account \ -H "Authorization: Bearer $PYLORA_TOKEN" # → { "id": "acct_7120", "balance_usd": 24.50, "plan_limit": 25, "rate_limit": 60 }
Treat the token like a password, because it is one
A key with write access can rebuild servers. Use a read-only token for dashboards and monitoring, rotate keys on a calendar, and revoke instantly from the panel if a laptop goes missing. Tokens are shown once at creation — we store only a hash, so nobody can read them back, including us.
One header, and you are in
Every request carries your token in the Authorization header as a bearer value. No signatures to compute, no per-request HMAC, no SDK required to get started.
Authorization: Bearer ply_live_0f4c9a2b7e1d4a86 Content-Type: application/json Accept: application/json
Token formats
Live tokens start with ply_live_ and act on real servers and real billing. Test tokens start with ply_test_ and run against a sandbox: full request validation, nothing provisioned, nothing charged. Build against test, switch the prefix when you are ready.
Scopes
Grant only what a script needs. read for metrics and status checks, write for create and resize, danger for destroy and reinstall. A monitoring cron that only reads graphs should never hold a destroy key.
Request scopes at creation
| Scope | Allows | Typical use |
|---|---|---|
| read | GET on every endpoint | Dashboards, uptime checks, billing exports |
| read, write | GET, POST, PATCH | CI pipelines that deploy and resize |
| read, write, danger | Everything | Your own automation, runbooks, IaC |
What we deliberately do not support
No Basic auth with your account email, no tokens in query strings, no shared "master" keys across a team. All three leak — into shell history, server logs, browser extensions, and screenshots. If a request arrives with a token in the URL, it is rejected with 401 invalid_token_placement and the token is flagged for rotation.
The endpoints you will use most
Grouped by what you are trying to do rather than by URL shape, because that is how people actually search. Every endpoint below is live on v1 and covered by the same auth and rate limits.
Instances
| Method | Path | What it does |
|---|---|---|
| GET | /v1/instances Paginated list. Filter with | Every server on the account with IP, plan, region and state. |
| POST | /v1/instances Body: | Create a VPS. Returns immediately with status: "new"; poll or use the webhook for active. |
| GET | /v1/instances/{id} | One server, full detail, including private networking and reverse DNS. |
| POST | /v1/instances/{id}/actions Action: | The power switch. One endpoint, an type field, and a job id you can track. |
| PATCH | /v1/instances/{id} | Rename, re-tag, or resize CPU, RAM and NVMe. Resize needs a brief stop unless you pass hot: true on supported plans. |
| DELETE | /v1/instances/{id} | Destroy the server and release the IP. Requires a danger token and cannot be undone — snapshot first. |
Snapshots & backups
| Method | Path | What it does |
|---|---|---|
| GET | /v1/instances/{id}/snapshots | On-demand snapshots plus the automatic weekly restore points, with size and timestamp. |
| POST | /v1/instances/{id}/snapshots | Take a snapshot now. Give it a name you will still understand in three months. |
| POST | /v1/snapshots/{id}/restore | Roll the server back to that point. The instance is stopped for the duration, usually a couple of minutes. |
| DELETE | /v1/snapshots/{id} | Remove a snapshot you no longer need. Automatic backups are managed by retention and cannot be deleted early. |
Firewall & networking
| Method | Path | What it does |
|---|---|---|
| GET | /v1/firewalls | List firewall groups and which instances they are attached to. |
| POST | /v1/firewalls | Create a group with an inbound rule set. Default-deny is the only sane default. |
| PATCH | /v1/firewalls/{id}/rules | Add or remove ports in one call. Changes apply in seconds, no reboot. |
| GET | /v1/instances/{id}/metrics Range: | CPU, memory, disk I/O and network throughput as time-series JSON. |
Account, plans & regions
| Method | Path | What it does |
|---|---|---|
| GET | /v1/plans | Every plan with vCPU, RAM, NVMe, transfer and current monthly price in USD. |
| GET | /v1/regions | Locations with a available flag, so a deploy script can fall back instead of failing. |
| GET | /v1/images | Operating systems and one-click apps, with version and release date. |
| GET | /v1/account | Balance, instance limit, and the rate limit that applies to your token. |
| GET | /v1/invoices | Billing history with a PDF link on each row. Read-only, and always in USD. |
Copy, paste, ship
The same request in four languages. Pick the one your pipeline already speaks — the JSON in and out is identical either way.
curl -X POST https://api.pyloracloud.asia/v1/instances \ -H "Authorization: Bearer $PYLORA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "plan": "kvm-2", "region": "singapore", "image": "ubuntu-24.04", "name": "api-demo-01", "backups": true }' # → 202 Accepted # { "id": "vps_8f31", "status": "new", "ip": "103.20.114.7", "region": "singapore" }
const res = await fetch("https://api.pyloracloud.asia/v1/instances", { method: "POST", headers: { Authorization: `Bearer ${process.env.PYLORA_TOKEN}`, "Content-Type": "application/json" }, body: JSON.stringify({ plan: "kvm-2", region: "singapore", image: "ubuntu-24.04", name: "api-demo-01", backups: true }) }); const vps = await res.json(); // { id: "vps_8f31", status: "new", ... }
import os, requests r = requests.post( "https://api.pyloracloud.asia/v1/instances", headers={"Authorization": f"Bearer {os.environ['PYLORA_TOKEN']}"}, json={ "plan": "kvm-2", "region": "singapore", "image": "ubuntu-24.04", "name": "api-demo-01", "backups": True, }, ) vps = r.json() # {"id": "vps_8f31", "status": "new", ...}
$ch = curl_init("https://api.pyloracloud.asia/v1/instances"); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer " . getenv("PYLORA_TOKEN"), "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "plan" => "kvm-2", "region" => "singapore", "image" => "ubuntu-24.04", "name" => "api-demo-01", "backups" => true, ]), ]); $vps = json_decode(curl_exec($ch), true);
# Run this in CI before every deploy. If the deploy fails, restore. curl -X POST https://api.pyloracloud.asia/v1/instances/vps_8f31/snapshots \ -H "Authorization: Bearer $PYLORA_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "pre-deploy-2026-11-20" }' # → { "id": "snap_22ab", "status": "creating", "size_gb": 18.4 }
curl -s https://api.pyloracloud.asia/v1/instances/vps_8f31/metrics \ -H "Authorization: Bearer $PYLORA_TOKEN" \ -d '{ "hours": 24, "step": 300 }' # → { "cpu": [ ... ], "memory": [ ... ], "disk_io": [ ... ], "network": [ ... ] }
Errors that tell you what to do
Every error body has a machine-readable code and a sentence a human can read. No bare 500 with a stack trace, no 400 that means "try again".
{
"error": {
"code": "insufficient_balance",
"message": "Plan kvm-2 costs $11.99/mo but the account balance is $4.50. Top up or pick a smaller plan.",
"doc_url": "https://www.pyloracloud.asia/api-docs/#errors"
}
}
| Status | Code | Meaning & what to do |
|---|---|---|
| 400 | validation_failed | The body is missing a field or has the wrong type. The response lists every problem, not just the first one. |
| 401 | invalid_token | Token missing, revoked, or malformed. Check the header name and that the token was not rotated. |
| 403 | scope_denied | The token lacks the scope for this action. A read-only token cannot create a server — that is the point. |
| 404 | not_found | The instance, snapshot or firewall does not exist on this account. IDs are account-scoped, not global. |
| 409 | conflict | The server is mid-action. Wait for the job to finish and retry — the response includes the job id. |
| 422 | insufficient_balance | The plan costs more than the account can cover. Top up or resize down. |
| 429 | rate_limited | Too many requests. The Retry-After header says how long to wait. Back off exponentially. |
| 500 | internal_error | Our side, not yours. The response carries a request_id — send it to support and we can trace the exact call. |
Predictable, published, and never a surprise
Limits exist so one runaway script cannot slow down everyone else. They are per token, they are generous for normal automation, and every response tells you exactly where you stand.
Bars show each limit relative to the standard request ceiling. Write actions are capped lower than reads on purpose — a typo in a loop should not be able to delete a fleet.
HTTP/2 200 X-RateLimit-Limit: 60 X-RateLimit-Remaining: 42 X-RateLimit-Reset: 1763609820 # and when you do hit the wall HTTP/2 429 Retry-After: 18 { "error": { "code": "rate_limited", "message": "Slow down for 18 seconds. Reads are cached for 30s — poll less often." } }
The pattern that never trips a limit
Read X-RateLimit-Remaining, and when it drops below 10 sleep until X-RateLimit-Reset instead of guessing. Cache what you just fetched — instance lists change far less often than most polling scripts assume. And prefer a webhook over a loop that asks "is it done yet?" every four seconds.
Let the server come to you
Stop polling. Register a URL and PyloraCloud posts an event the moment something finishes — a build that went live, a snapshot that completed, an instance that got suspended for overdue billing.
{
"id": "evt_5c19d3",
"type": "instance.active",
"created_at": "2026-11-20T04:52:11Z",
"data": {
"id": "vps_8f31",
"name": "api-demo-01",
"region": "singapore",
"ip": "103.20.114.7",
"plan": "kvm-2"
}
}
Available events
| Event | Fires when |
|---|---|
| instance.new | Creation accepted |
| instance.active | Server is reachable |
| instance.deleted | Destroy finished |
| snapshot.completed | Restore point ready |
| snapshot.failed | Backup did not finish |
| billing.overdue | Payment failed, before any suspension |
import hmac, hashlib def verify(request, secret): received = request.headers["X-Pylora-Signature"] expected = "v1=" + hmac.new( secret.encode(), request.raw_data, hashlib.sha256 ).hexdigest() return hmac.compare_digest(received, expected) # Reject anything that fails, and reply 2xx fast. # Do the slow work in a queue — we retry a timeout 5 times with backoff.
We would rather be boring than break your build
The API is versioned in the path. A breaking change means a new version, never a quiet edit to v1.
Additive only on v1
New fields and new endpoints appear freely — scripts should ignore keys they do not recognise. Renamed fields, removed endpoints, or changed types do not happen on a version you already deployed against.
Long deprecation windows
If a version is ever retired, it keeps serving for at least 12 months, returns a Sunset header the whole time, and you get an email — not a changelog buried on page nine.
Send a User-Agent
Optional, but it helps us enormously. myapp-deploy/1.4 tells us which integrations to test before a release, instead of guessing from traffic shapes.
Questions that come up before the first commit
Does the API cost extra?
No. It is included in every PyloraCloud plan, and we never bill per request. A server created with POST /v1/instances costs exactly what the same plan costs in the control panel — same price, same 99.9% uptime SLA, same weekly backups.
Do refunds still apply to servers I created by code?
Yes. The 72-hour delivery check on every order and the 7-day money-back guarantee on your first VPS order apply the same way whether the instance came from the panel or from the API. Refunds go back to your original PayPal payment method. Full terms are in our Refund Policy.
Is there an official SDK?
Not one we maintain, and that is deliberate. The API is plain REST and JSON, so curl, fetch, or requests is genuinely enough — and you will never be stuck waiting for an SDK to catch up with a new endpoint. The examples above are the whole integration.
Can I manage Terraform or Ansible with it?
Yes, and plenty of people do. The endpoints map cleanly onto resources: instances, firewall groups, snapshots, SSH keys. Use a token scoped to read, write for day-to-day runs and keep danger out of your CI variables.
What is the largest fleet the API handles comfortably?
Hundreds of instances is normal. Pagination is cursor-based with a 200-item page, so a full inventory scan is a handful of requests rather than a thousand. If you need more than 60 requests a minute, tell us what you are building and we will look at it together.
Do you log request bodies?
We log the route, the status, the timing, and the request_id. Bodies are not stored, and tokens are never written to any log. That is why a request_id is the fastest way to get an answer from support.
Something not behaving the way this page says it should?
Send the endpoint, the request id, and what you expected. You will hear back from the person who can actually change the behaviour — usually the same afternoon.
New to the command line? Start with Connect to your VPS for the first time — it takes about six minutes.
