API Docs

API v1 · Version 2.1 · Last updated 2026

API Documentation

Everything you can do in the dashboard you can do over HTTPS and JSON. One base URL, bearer tokens with scopes, predictable pagination, and responses that carry the same timestamps our billing and SLA measurement use. No SDK required, no vendor lock-in, no undocumented endpoints.

RESTJSON over HTTPS, no session cookies, no SOAP
40 sTypical deploy from request to reachable server
600Requests per minute, per API key
5Regions and 15 OS images selectable per call
Base URLproduction
https://api.kodavps.shop/v1
Section 1

Conventions & versioning

  • Transport — HTTPS only. Plain HTTP requests are refused with 400 Bad Request, not redirected, so a credential can never travel in the clear by accident.
  • Content type — application/json; charset=utf-8 on both directions. Request bodies over 1 MB are rejected.
  • Timestamps — RFC 3339 in UTC, e.g. 2026-10-27T08:21:44Z. The same clock measures the 99.9% uptime target in the Terms of Service.
  • Identifiers — opaque strings, e.g. srv_7f2c91. Never parse them; they carry no meaning and may change format.
  • Versioning — the major version sits in the path. Additive changes (new fields, new endpoints) ship without a version bump; anything that removes or renames a field requires a new major version.
  • Deprecation — a retired field or endpoint is announced at least 12 months ahead and carries a Sunset response header for the whole period.
HeaderUse
AuthorizationBearer token. Required on every request.
Idempotency-KeyOptional. Makes a POST safe to retry. See Section 4.
X-Request-IdReturned on every response. Quote it in a ticket.
DeprecationPresent only when the call is scheduled for removal.
Section 2

Authentication & scopes

Keys are created in the account area, shown once, and stored only as a hash — the same rule that applies to passwords in the Privacy Policy. A lost key cannot be recovered, only revoked and replaced.

Requestlist servers
curl https://api.kodavps.shop/v1/servers \
  -H "Authorization: Bearer kdv_live_9f2c41a8b7e0d5m3" \
  -H "Content-Type: application/json"
ScopeGrants
readList and inspect every resource. Safe default for monitoring.
servers:writeCreate, resize, reboot, rebuild, restore, delete.
network:writerDNS and firewall rule changes.
billing:readInvoices and usage charges. Read-only, always.
  • Key prefix marks the environment: kdv_live_ for production, kdv_test_ for the sandbox, which bills nothing and resets nightly.
  • Least privilege — issue one key per job. A CI pipeline that only reports status needs read and nothing else.
  • Rotation — set an expiry on every key. Overlap old and new for one deploy cycle, then revoke.
  • IP allowlist — optional per key. A request from any other address returns 403 and is logged.
What a key can never do

No scope reads or alters payment credentials. The API cannot see card data, cannot change the PayPal billing agreement, and cannot withdraw funds. Charges created by the API settle against the agreement you authorised at checkout, as described in the Payment Options page.

Section 3

Rate limits & concurrency

Limits are per key, not per account, so one busy integration cannot lock you out of your own dashboard. Every response carries its current budget.

Sustained requests 600 / min
Burst allowance 60 req / 5 s
Concurrent deployments 10 in flight
Snapshot creates 30 / hour
Response headersevery call
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 594
X-RateLimit-Reset: 1761550860
  • Exceeding a limit returns 429 with a Retry-After header in seconds. Back off to that value rather than retrying immediately — hammering a 429 extends the window.
  • Deployment concurrency is separate from request rate: you may poll status at full speed while ten builds run.
  • Need a higher ceiling for a fleet automation? Ask through a ticket with the use case; limits are raised on request for legitimate volume.
Section 4

Pagination, filtering & idempotency

Collection endpoints are cursor-paginated. Cursors are opaque and stable, so rows cannot shift between pages while you walk them.

Requestpage 2, filtered
GET /v1/servers?limit=50&region=ams&status=active&cursor=eyJvIjo1MH0
Response200 OK
{
  "object": "list",
  "has_more": true,
  "next_cursor": "eyJvIjoxMDB9",
  "data": [ /* server objects */ ]
}
  • limit accepts 1–100 and defaults to 25.
  • status, region, and image are repeatable filters; multiple values on one key are OR-ed.
  • created_after and created_before take RFC 3339 timestamps.
  • Idempotency — send Idempotency-Key: uuid on any POST. A retry with the same key returns the original result instead of building a second server, and the key is honoured for 24 hours.
Section 5

Errors & status codes

Errors use conventional HTTP status codes and one consistent body, so a handler can branch on type without parsing prose.

Response422 Unprocessable Entity
{
  "error": {
    "type": "region_capacity",
    "message": "No capacity for plan pro in ams. Try fra or nyc.",
    "request_id": "req_01k8f4h2yq"
  }
}
StatusMeaning & what to do
200 / 201Success. 201 on creation, with the object returned.
202Accepted and queued. Poll the resource; long jobs are asynchronous by design.
400Malformed JSON or an unknown parameter. Fix the body, do not retry as-is.
401Missing, expired, or revoked token.
403Valid key, wrong scope, or an address outside the IP allowlist.
404No such resource on this account. Deleted servers also return 404, never a partial record.
409State conflict — rebooting a server that is still building, for example.
422Understood but refused: no capacity, invalid image for that plan, quota reached.
429Rate limited. Honour Retry-After.
500 / 503Ours. Retry with backoff. Sustained 5xx is an incident and appears on the status page.

A provisioning request that fails permanently is never left charged. If a build cannot complete, the order is retried or refunded in full, exactly as the Refund Policy states.

Section 6

Regions

Region codes are stable strings you can hard-code. Availability and capacity are live values, so read them before a large deploy.

Requestlist regions
GET /v1/regions
Response200 OK
{
  "object": "list",
  "data": [
    { "code": "sin", "city": "Singapore",     "country": "SG", "available": true },
    { "code": "tyo", "city": "Tokyo",          "country": "JP", "available": true },
    { "code": "ams", "city": "Amsterdam",      "country": "NL", "available": true },
    { "code": "fra", "city": "Frankfurt",      "country": "DE", "available": true },
    { "code": "nyc", "city": "New York",       "country": "US", "available": true }
  ]
}

Choosing ams or fra keeps the disk contents of that server inside the EU, which is the simplest answer when data residency matters — see the Privacy Policy for the full transfer position.

Section 7

Operating-system images

Requestlist images
GET /v1/images?distro=ubuntu
Response200 OK
{
  "object": "list",
  "data": [
    { "slug": "ubuntu-24.04-x64", "name": "Ubuntu 24.04 LTS x64", "type": "linux",   "min_disk_gb": 15 },
    { "slug": "debian-12-x64",    "name": "Debian 12 x64",        "type": "linux",   "min_disk_gb": 10 },
    { "slug": "almalinux-9-x64",  "name": "AlmaLinux 9 x64",      "type": "linux",   "min_disk_gb": 10 },
    { "slug": "windows-2022",     "name": "Windows Server 2022",  "type": "windows", "min_disk_gb": 40 }
  ]
}

Fifteen images are published: AlmaLinux 8 and 9, CentOS 7, Debian 11 and 12, Fedora 41 and 42, Rocky Linux 8 and 9, Ubuntu 20.04, 22.04 and 24.04 LTS, and Windows Server 2019, 2022 and 2025. Windows builds take a few minutes where a Linux image is typically reachable in under 40 seconds.

Section 8

Servers

Method & pathAction
GET /v1/serversList servers on the account.
POST /v1/serversDeploy a new server.
GET /v1/servers/{id}Fetch one server, including live status.
DELETE /v1/servers/{id}Release a server and its disk.
RequestPOST /v1/servers
{
  "name": "edge-ams-01",
  "plan": "pro",
  "region": "ams",
  "image": "ubuntu-24.04-x64",
  "ssh_keys": ["sshkey_41b9c2"],
  "backups": true,
  "ipv6": true,
  "user_data": /* optional cloud-init, base64 */
}
Response202 Accepted
{
  "id": "srv_7f2c91",
  "name": "edge-ams-01",
  "status": "new",
  "plan": "pro",
  "region": "ams",
  "image": "ubuntu-24.04-x64",
  "memory_mb": 4096,
  "vcpus": 2,
  "disk_gb": 80,
  "transfer_gb": 4000,
  "ipv4": "185.243.118.42",
  "ipv6": "2a10:8040:1::42",
  "created_at": "2026-10-27T08:21:44Z",
  "actions": ["reboot", "power_off", "resize", "snapshot"]
}
  • status moves new → active, with building, rebooting, off, and suspended in between. Poll the resource or subscribe to webhooks in Section 14.
  • actions lists only what is legal in the current state, so a UI can render buttons without guessing.
  • A deployment creates a charge on the account, settled against the PayPal billing agreement authorised at checkout. The API never touches payment credentials.
  • A server created through the API is covered by the same 7-day money-back guarantee as one created in the browser, on the conditions in the Refund Policy.
Section 9

Power, reboot & rebuild

Method & pathAction
POST /v1/servers/{id}/actionsAll lifecycle operations, selected by the type field.
Requestsoft reboot
{ "type": "reboot", "mode": "soft" }
typeBehaviour
power_onStarts a stopped server. Returns 202.
power_offsoft asks the OS to shut down; hard cuts power. Use soft first.
rebootsoft or hard, same distinction.
rebuildReinstalls an image and destroys current disk contents. Requires "confirm": true.

A rebuild is irreversible the moment it starts. If you need the data afterwards, take a snapshot first — and note that a rebuild to a different image is the supported way to move between Linux distributions without ordering a new server.

Section 10

Resize

Requestpro → business
{ "type": "resize", "plan": "business", "disk": true }
  • Resize is live — the server reboots once, typically under 60 seconds, and keeps its IP addresses.
  • Upgrades apply immediately and are pro-rated against the remaining period; downgrades take effect at the next cycle so paid capacity is never cut early, as the Payment Options page states.
  • "disk": true grows the filesystem to the new volume. Without it the disk stays its current size and can be grown later.
  • Storage is never shrunk by an API call. A smaller plan needs a fresh server and a copy, because truncating a live filesystem risks data loss.

Renewals, upgrades, and add-ons are not refundable outside the guarantee window — the exclusions in the Refund Policy apply to API-initiated resizes exactly as they do to dashboard clicks.

Section 11

Snapshots

Method & pathAction
GET /v1/servers/{id}/snapshotsList snapshots for a server.
POST /v1/servers/{id}/snapshotsCreate one now.
POST /v1/servers/{id}/actionsRestore with {"type":"restore","snapshot":"snap_31ac"}.
DELETE /v1/snapshots/{id}Remove a snapshot.
Response201 Created
{
  "id": "snap_31ac90",
  "server": "srv_7f2c91",
  "status": "in_progress",
  "size_gb": 12,
  "kind": "manual",
  "created_at": "2026-10-27T08:29:02Z"
}
  • Weekly snapshots are included on every plan at no cost; kind distinguishes auto from manual.
  • Creating a snapshot does not stop the server, but a filesystem quiesce gives the cleanest restore for databases.
  • Restoring overwrites current disk contents and requires "confirm": true.
  • Snapshots are a recovery tool for faults and honest mistakes, not a substitute for your own backups — the position stated in the Terms of Service.
Section 12

Networking, rDNS & firewall

Method & pathAction
GET /v1/servers/{id}/ipsList assigned addresses.
PUT /v1/ips/{ip}/rdnsSet the reverse DNS record.
GET /v1/servers/{id}/firewallRead the attached rule set.
POST /v1/firewalls/{id}/rulesAdd an inbound rule.
DELETE /v1/firewalls/{id}/rules/{n}Remove a rule.
Requestadd inbound rule
{ "protocol": "tcp", "port": 8443, "source": "0.0.0.0/0", "comment": "app" }
  • Outbound port 25 stays blocked by default. The firewall API cannot open it; SMTP removal is a support request under Clause 3 of the Acceptable Use Policy, so a scripted run cannot turn a new server into a spam source.
  • rDNS is settable once the address has clean history. A mismatch between forward and reverse records is the most common reason mail is refused.
  • Rules apply within seconds and are evaluated before the host firewall, so an explicit deny is honoured.
  • DDoS filtering sits in front of every address and cannot be disabled through the API.
Section 13

Usage metrics

Requesthourly series, 7 days
GET /v1/servers/{id}/metrics?window=7d&step=1h
Response200 OK
{
  "server": "srv_7f2c91",
  "window": "7d",
  "cpu_percent":      { "avg": 14.2, "peak": 61.0 },
  "memory_mb":        { "avg": 1840, "peak": 3120 },
  "disk_used_gb":     { "avg": 22.4, "peak": 24.1 },
  "transfer_out_gb":  { "total": 318.6, "quota": 4000 },
  "uptime_percent":   { "month_to_date": 100.0 }
}
  • Metrics are hypervisor-side, so they remain accurate even when the guest OS is unresponsive — that is what makes them usable as SLA evidence.
  • uptime_percent.month_to_date is the same figure used to calculate the service credits in the Terms of Service. A shortfall is credited automatically; you do not need to open a ticket to receive it.
  • Retention: 7 days at 1-minute resolution, 30 days at 1 hour, 13 months at 1 day.
  • Bandwidth counters reset on the first day of each month in UTC and never bill overage silently — extra transfer is an add-on you order explicitly.
Section 14

Events & webhooks

Webhooks remove polling. Register an HTTPS endpoint and we post a signed JSON body when something happens to your infrastructure.

Method & pathAction
GET /v1/eventsAudit trail of everything that happened on the account.
POST /v1/webhooksRegister an endpoint with a secret and an event list.
DELETE /v1/webhooks/{id}Remove it.
Payloadserver.active
{
  "id": "evt_88b1c0",
  "type": "server.active",
  "created_at": "2026-10-27T08:22:19Z",
  "data": { "id": "srv_7f2c91", "ipv4": "185.243.118.42" }
}
  • Signature — every delivery carries X-Koda-Signature, an HMAC-SHA256 of the body using your endpoint secret. Verify it before acting; an unsigned POST is not from us.
  • Delivery — a non-2xx response is retried with exponential backoff for up to 24 hours, then the endpoint is marked failing and you are emailed.
  • Idempotent handling — retries reuse the same evt_ id, so deduplicate on it.
  • Event types — server.created, server.active, server.offline, snapshot.completed, resize.completed, invoice.paid, invoice.failed, abuse.reported.
  • abuse.reported fires the moment a notice is forwarded to you, so automation can react before the 72-hour fix window in the Abuse Policy runs down.
Section 15

Billing records

Billing endpoints are read-only by design. There is no route that charges a card, moves money, or changes a payment method — those actions live in your PayPal account and on the checkout page.

Method & pathAction
GET /v1/invoicesList invoices with totals in USD.
GET /v1/invoices/{id}One invoice, with line items and the PayPal reference.
GET /v1/invoices/{id}/pdfThe archived PDF, byte-identical to the emailed copy.
  • Amounts are always USD, the single billing currency across the platform.
  • Responses include the transaction reference, never a payment instrument. No field in any billing response can contain a card number, because no such data exists on this infrastructure.
  • Invoice records are retained for the period published in the Privacy Policy and stay downloadable for that whole time.
Section 16

CLI examples

There is no official binary to install, which means nothing to trust or update. The API is designed so that curl and a JSON path are a complete toolchain.

Deploy and waitbash
KEY=kdv_live_9f2c41a8b7e0d5m3

ID=$(curl -s https://api.kodavps.shop/v1/servers \
  -H "Authorization: Bearer $KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"plan":"starter","region":"sin","image":"debian-12-x64"}' \
  | jq -r .id)

while :; do
  S=$(curl -s -H "Authorization: Bearer $KEY" \
      https://api.kodavps.shop/v1/servers/$ID | jq -r .status)
  [ "$S" = "active" ] && break
  sleep 2
done
echo "ready"
Snapshot every server nightlycron
0 3 * * * curl -s 'https://api.kodavps.shop/v1/servers?limit=100' \
  -H "Authorization: Bearer $KEY" \
  | jq -r '.data[].id' \
  | xargs -I{} curl -s -X POST \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"nightly"}' \
  https://api.kodavps.shop/v1/servers/{}/snapshots

Run experiments against kdv_test_ keys first. The sandbox mirrors production behaviour, returns the same shapes, and creates no charges.

Section 17

API, policy & compliance

Automation does not bypass the rules that govern a manual click. Every policy applies to an API call identically, and the enforcement path is the same.

  • The Acceptable Use Policy applies in full. An API-created server used for spam, phishing, malware, DDoS, or unauthorised crypto mining is handled on the same ladder, with the same deadlines.
  • Outbound SMTP cannot be opened by any endpoint, whatever a script sends.
  • A suspension for an Acceptable Use breach is not refundable, including inside the guarantee window — the position stated in the Refund Policy.
  • Rate limiting and concurrency caps exist to protect the shared network, and are not a substitute for your own traffic control.
  • Logs — API request metadata (timestamp, endpoint, status, key id, source IP) is retained for 12 months as security data under the Privacy Policy. Request bodies containing your application data are not stored.
  • No content inspection — the API exposes metrics and events, never the contents of your disks or your traffic.
  • Access — abuse of an endpoint to attack another tenant is itself an Acceptable Use breach and is handled immediately.
  • Support — API questions follow the same 24/7 ticket channel and the same median first-reply target as everything else.
Section 18

Changelog & deprecation

DateChange
2026-10-27abuse.reported webhook event added, with the notice attached.
2026-09-14Idempotency keys supported on all POST routes; window extended to 24 hours.
2026-08-02Live disk growth on resize via "disk": true.
2026-06-20New York region added to /v1/regions.
2026-04-11Metrics retention extended to 13 months at daily resolution.
2026-01-30API v1 declared stable. No breaking change since.

Breaking changes ship only as a new major version, with the previous version supported for 12 months and a Sunset header on every affected response for that period. Additive changes are listed here on the day they go live.

Is there a JavaScript or Python SDK?

Not an official one, and deliberately so — a wrapper is another thing to audit and another thing that breaks. The API is plain JSON over HTTPS, so fetch, requests, or curl is the whole integration. If you build a client, publish it under your own name.

Can the API create an order for a new customer?

No. The first order is placed on the website through PayPal checkout, which is where the billing agreement is authorised. Once an account exists, the API can deploy further servers against it, and those charges settle on that agreement.

What happens to API keys if a server is refunded?

Nothing. Keys belong to the account, not to a server. Revoking a key is instant and takes effect on the next request, with no cache window.

Do you support IPv6-only servers?

IPv6 is added alongside IPv4 on every plan and can be requested at creation with "ipv6": true. IPv6-only is available on request for customers who need it.

Need a key raised, or a use case checked?

Rate limits are lifted on request for legitimate volume, and unusual workloads get a straight answer before you build on them. API questions go through the same ticket system, answered 24/7.

Talk to the operator