Call us now:
API Docs
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.
https://api.kodavps.shop/v1
What this documentation covers
- Conventions & versioning
- Authentication & scopes
- Rate limits & concurrency
- Pagination, filtering & idempotency
- Errors & status codes
- Regions
- Operating-system images
- Servers
- Power, reboot & rebuild
- Resize
- Snapshots
- Networking, rDNS & firewall
- Usage metrics
- Events & webhooks
- Billing records
- CLI examples
- API, policy & compliance
- Changelog & deprecation
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-8on 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
Sunsetresponse header for the whole period.
| Header | Use |
|---|---|
Authorization | Bearer token. Required on every request. |
Idempotency-Key | Optional. Makes a POST safe to retry. See Section 4. |
X-Request-Id | Returned on every response. Quote it in a ticket. |
Deprecation | Present only when the call is scheduled for removal. |
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.
curl https://api.kodavps.shop/v1/servers \ -H "Authorization: Bearer kdv_live_9f2c41a8b7e0d5m3" \ -H "Content-Type: application/json"
| Scope | Grants |
|---|---|
read | List and inspect every resource. Safe default for monitoring. |
servers:write | Create, resize, reboot, rebuild, restore, delete. |
network:write | rDNS and firewall rule changes. |
billing:read | Invoices 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
readand 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
403and is logged.
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.
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.
X-RateLimit-Limit: 600 X-RateLimit-Remaining: 594 X-RateLimit-Reset: 1761550860
- Exceeding a limit returns
429with aRetry-Afterheader 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.
Pagination, filtering & idempotency
Collection endpoints are cursor-paginated. Cursors are opaque and stable, so rows cannot shift between pages while you walk them.
GET /v1/servers?limit=50®ion=ams&status=active&cursor=eyJvIjo1MH0
{
"object": "list",
"has_more": true,
"next_cursor": "eyJvIjoxMDB9",
"data": [ /* server objects */ ]
}
limitaccepts 1–100 and defaults to 25.status,region, andimageare repeatable filters; multiple values on one key are OR-ed.created_afterandcreated_beforetake RFC 3339 timestamps.- Idempotency — send
Idempotency-Key: uuidon 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.
Errors & status codes
Errors use conventional HTTP status codes and one consistent body, so a handler can branch on type without parsing prose.
{
"error": {
"type": "region_capacity",
"message": "No capacity for plan pro in ams. Try fra or nyc.",
"request_id": "req_01k8f4h2yq"
}
}
| Status | Meaning & what to do |
|---|---|
200 / 201 | Success. 201 on creation, with the object returned. |
202 | Accepted and queued. Poll the resource; long jobs are asynchronous by design. |
400 | Malformed JSON or an unknown parameter. Fix the body, do not retry as-is. |
401 | Missing, expired, or revoked token. |
403 | Valid key, wrong scope, or an address outside the IP allowlist. |
404 | No such resource on this account. Deleted servers also return 404, never a partial record. |
409 | State conflict — rebooting a server that is still building, for example. |
422 | Understood but refused: no capacity, invalid image for that plan, quota reached. |
429 | Rate limited. Honour Retry-After. |
500 / 503 | Ours. 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.
Regions
Region codes are stable strings you can hard-code. Availability and capacity are live values, so read them before a large deploy.
GET /v1/regions
{
"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.
Operating-system images
GET /v1/images?distro=ubuntu
{
"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.
Servers
| Method & path | Action |
|---|---|
GET /v1/servers | List servers on the account. |
POST /v1/servers | Deploy a new server. |
GET /v1/servers/{id} | Fetch one server, including live status. |
DELETE /v1/servers/{id} | Release a server and its disk. |
{
"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 */
}
{
"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"]
}
statusmovesnew → active, withbuilding,rebooting,off, andsuspendedin between. Poll the resource or subscribe to webhooks in Section 14.actionslists 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.
Power, reboot & rebuild
| Method & path | Action |
|---|---|
POST /v1/servers/{id}/actions | All lifecycle operations, selected by the type field. |
{ "type": "reboot", "mode": "soft" }
type | Behaviour |
|---|---|
power_on | Starts a stopped server. Returns 202. |
power_off | soft asks the OS to shut down; hard cuts power. Use soft first. |
reboot | soft or hard, same distinction. |
rebuild | Reinstalls 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.
Resize
{ "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": truegrows 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.
Snapshots
| Method & path | Action |
|---|---|
GET /v1/servers/{id}/snapshots | List snapshots for a server. |
POST /v1/servers/{id}/snapshots | Create one now. |
POST /v1/servers/{id}/actions | Restore with {"type":"restore","snapshot":"snap_31ac"}. |
DELETE /v1/snapshots/{id} | Remove a snapshot. |
{
"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;
kinddistinguishesautofrommanual. - 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.
Networking, rDNS & firewall
| Method & path | Action |
|---|---|
GET /v1/servers/{id}/ips | List assigned addresses. |
PUT /v1/ips/{ip}/rdns | Set the reverse DNS record. |
GET /v1/servers/{id}/firewall | Read the attached rule set. |
POST /v1/firewalls/{id}/rules | Add an inbound rule. |
DELETE /v1/firewalls/{id}/rules/{n} | Remove a 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.
Usage metrics
GET /v1/servers/{id}/metrics?window=7d&step=1h
{
"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_dateis 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.
Events & webhooks
Webhooks remove polling. Register an HTTPS endpoint and we post a signed JSON body when something happens to your infrastructure.
| Method & path | Action |
|---|---|
GET /v1/events | Audit trail of everything that happened on the account. |
POST /v1/webhooks | Register an endpoint with a secret and an event list. |
DELETE /v1/webhooks/{id} | Remove it. |
{
"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.reportedfires the moment a notice is forwarded to you, so automation can react before the 72-hour fix window in the Abuse Policy runs down.
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 & path | Action |
|---|---|
GET /v1/invoices | List invoices with totals in USD. |
GET /v1/invoices/{id} | One invoice, with line items and the PayPal reference. |
GET /v1/invoices/{id}/pdf | The 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.
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.
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"
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.
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.
Changelog & deprecation
| Date | Change |
|---|---|
| 2026-10-27 | abuse.reported webhook event added, with the notice attached. |
| 2026-09-14 | Idempotency keys supported on all POST routes; window extended to 24 hours. |
| 2026-08-02 | Live disk growth on resize via "disk": true. |
| 2026-06-20 | New York region added to /v1/regions. |
| 2026-04-11 | Metrics retention extended to 13 months at daily resolution. |
| 2026-01-30 | API 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