API Documentation

API Docs | PyloraCloud — Run Your Whole VPS Fleet from Code
PyloraCloud · Platform API v1

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.

REST + JSON 60 req/min HTTPS only Signed webhooks
pylora-api — zsh
https://api.pyloracloud.asia/v1 v1 · stable

All requests go over HTTPS. Plain HTTP is refused, not redirected — we would rather fail loudly than send your token in the clear.

Why it exists

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.

Quick start

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.

01

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.

02

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.

03

Make the call

Send one authenticated request to list your instances. If JSON comes back, everything after that is the same pattern.

verify-your-token.sh
# 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.

Authentication

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.

the only header you need
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

ScopeAllowsTypical use
readGET on every endpointDashboards, uptime checks, billing exports
read, writeGET, POST, PATCHCI pipelines that deploy and resize
read, write, dangerEverythingYour 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.

Reference

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.

GET

Instances

MethodPathWhat it does
GET/v1/instances

Paginated list. Filter with ?region=, ?status=, ?tag=.

Every server on the account with IP, plan, region and state.
POST/v1/instances

Body: plan, region, image, optional ssh_keys, backups, user_data.

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: reboot, power_cycle, shutdown, password_reset, rebuild.

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.
GET

Snapshots & backups

MethodPathWhat it does
GET/v1/instances/{id}/snapshotsOn-demand snapshots plus the automatic weekly restore points, with size and timestamp.
POST/v1/instances/{id}/snapshotsTake a snapshot now. Give it a name you will still understand in three months.
POST/v1/snapshots/{id}/restoreRoll 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.
GET

Firewall & networking

MethodPathWhat it does
GET/v1/firewallsList firewall groups and which instances they are attached to.
POST/v1/firewallsCreate a group with an inbound rule set. Default-deny is the only sane default.
PATCH/v1/firewalls/{id}/rulesAdd or remove ports in one call. Changes apply in seconds, no reboot.
GET/v1/instances/{id}/metrics

Range: ?hours=24, ?step=300.

CPU, memory, disk I/O and network throughput as time-series JSON.
GET

Account, plans & regions

MethodPathWhat it does
GET/v1/plansEvery plan with vCPU, RAM, NVMe, transfer and current monthly price in USD.
GET/v1/regionsLocations with a available flag, so a deploy script can fall back instead of failing.
GET/v1/imagesOperating systems and one-click apps, with version and release date.
GET/v1/accountBalance, instance limit, and the rate limit that applies to your token.
GET/v1/invoicesBilling history with a PDF link on each row. Read-only, and always in USD.
Code examples

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.

create-a-vps
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);
snapshot-before-deploy.sh
# 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 }
pull-24h-metrics.sh
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 & status codes

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".

what an error looks like
{
  "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"
  }
}
StatusCodeMeaning & what to do
400validation_failedThe body is missing a field or has the wrong type. The response lists every problem, not just the first one.
401invalid_tokenToken missing, revoked, or malformed. Check the header name and that the token was not rotated.
403scope_deniedThe token lacks the scope for this action. A read-only token cannot create a server — that is the point.
404not_foundThe instance, snapshot or firewall does not exist on this account. IDs are account-scoped, not global.
409conflictThe server is mid-action. Wait for the job to finish and retry — the response includes the job id.
422insufficient_balanceThe plan costs more than the account can cover. Top up or resize down.
429rate_limitedToo many requests. The Retry-After header says how long to wait. Back off exponentially.
500internal_errorOur side, not yours. The response carries a request_id — send it to support and we can trace the exact call.
Rate limits

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.

Standard token 60 req / min
Burst allowance +30 short spikes
Create actions 10 per hour
Destroy actions 5 per hour

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.

response headers on every call
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.

Webhooks

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.

the payload you receive
{
  "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

EventFires when
instance.newCreation accepted
instance.activeServer is reachable
instance.deletedDestroy finished
snapshot.completedRestore point ready
snapshot.failedBackup did not finish
billing.overduePayment failed, before any suspension
verify the signature before trusting a byte
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.
Versioning & stability

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.

API FAQ

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.