API documentation
Deploy, resize, reboot and destroy cloud servers programmatically. A small, predictable REST API that speaks JSON, authenticates with a bearer token, and provisions servers for you.
Introduction
The CAIport API is a JSON REST API over HTTPS. Every request and response body is JSON. All monetary amounts are integers in cents AUD (so 3900 means A$39.00).
https://caiport.com/v1 — all endpoints below are relative to it.Authentication
Authenticate with a bearer token in the Authorization header. Create keys in the dashboard under API keys — the full secret is shown once at creation, so copy it then. Keys are prefixed aisk_.
Authorization: Bearer aisk_live_9f3c2a7b8d1e4f5a6c0b…
The GET /v1/plans, /v1/regions and /v1/images endpoints are public and need no auth. Every other endpoint requires a valid key.
Quickstart
From zero to SSH in four steps:
- Create an account at caiport.com.
- Add your SSH public key in the dashboard — it's installed on every server you deploy.
- Create an API key under API keys and copy the
aisk_…secret. - Deploy with one call:
$ curl -X POST https://caiport.com/v1/servers \ -H "Authorization: Bearer aisk_live_…" \ -H "Content-Type: application/json" \ -d '{"plan":"standard","region":"ap-southeast-2","image":"ubuntu-22","name":"my-app"}' → 201 { "data": { "id": "sv_9f3…", "state": "pending" }, "provision": "ok" }
Poll GET /v1/servers/{id} until state is running, then ssh ubuntu@<public_ip>.
GET/v1/plans
List all plans. Public — no auth required.
$ curl https://caiport.com/v1/plans
{
"data": [
{
"id": "standard",
"name": "Standard",
"class": "general",
"vcpu": 2,
"ram": "4 GB",
"storage_gb": 80,
"bandwidth": "3 TB",
"price_cents": 3900,
"popular": true
}
]
}
GET/v1/regions
List available regions. Public — no auth required.
$ curl https://caiport.com/v1/regions
{
"data": [
{ "id": "ap-southeast-2", "name": "Sydney", "flag": "🇦🇺" },
{ "id": "us-east-1", "name": "N. Virginia", "flag": "🇺🇸" },
{ "id": "eu-west-1", "name": "Ireland", "flag": "🇪🇺" },
{ "id": "ap-southeast-1", "name": "Singapore", "flag": "🇸🇬" }
]
}
GET/v1/images
List OS images. Public — no auth required.
$ curl https://caiport.com/v1/images
{
"data": [
{ "id": "ubuntu-22", "name": "Ubuntu 22.04 LTS" },
{ "id": "ubuntu-24", "name": "Ubuntu 24.04 LTS" },
{ "id": "debian-12", "name": "Debian 12" },
{ "id": "amazon-2023", "name": "Amazon Linux 2023" },
{ "id": "rocky-9", "name": "Rocky Linux 9" },
{ "id": "ubuntu-docker", "name": "Ubuntu + Docker" }
]
}
GET/v1/account
Current account usage and limits. All amounts are in cents AUD.
$ curl https://caiport.com/v1/account \ -H "Authorization: Bearer aisk_live_…" { "servers": 3, "server_limit": 25, "committed_cents": 13700, "spend_cap_cents": 100000, "remaining_cents": 86300 }
GET/v1/servers
List your servers.
$ curl https://caiport.com/v1/servers \ -H "Authorization: Bearer aisk_live_…" { "data": [ { "id": "sv_9f3c2a7b", "name": "my-app", "plan": "standard", "plan_name": "Standard", "specs": { "vcpu": 2, "ram": "4 GB", "storage_gb": 80 }, "region": "ap-southeast-2", "image": "ubuntu-22", "state": "running", "public_ip": "13.55.201.84", "price_cents": 3900 } ] }
POST/v1/servers
Deploy a new server. Returns 201 with the new server and "provision":"ok". The server moves through the states pending → provisioning → running (or error if provisioning fails).
Body
{
"plan": "standard", // plan id (see /v1/plans)
"region": "ap-southeast-2", // region id (see /v1/regions)
"image": "ubuntu-22", // image id (see /v1/images)
"name": "my-app" // optional label
}
$ curl -X POST https://caiport.com/v1/servers \ -H "Authorization: Bearer aisk_live_…" \ -H "Content-Type: application/json" \ -d '{"plan":"standard","region":"ap-southeast-2","image":"ubuntu-22","name":"my-app"}' → 201 { "data": { "id": "sv_9f3c2a7b", "name": "my-app", "plan": "standard", "plan_name": "Standard", "specs": { "vcpu": 2, "ram": "4 GB", "storage_gb": 80 }, "region": "ap-southeast-2", "image": "ubuntu-22", "state": "pending", "public_ip": null, "price_cents": 3900 }, "provision": "ok" }
GET/v1/servers/{id}
Retrieve a single server by id. Useful for polling until state becomes running and public_ip is assigned.
$ curl https://caiport.com/v1/servers/sv_9f3c2a7b \ -H "Authorization: Bearer aisk_live_…" { "data": { "id": "sv_9f3c2a7b", "state": "running", "public_ip": "13.55.201.84", … } }
POST/v1/servers/{id}/actions
Perform a lifecycle action. The action field is one of start, stop, reboot or resize. For resize, include the target plan — the server reboots into the new size and billing adjusts, prorated.
$ curl -X POST https://caiport.com/v1/servers/sv_9f3c2a7b/actions \ -H "Authorization: Bearer aisk_live_…" \ -H "Content-Type: application/json" \ -d '{"action":"resize","plan":"pro"}' → { "data": { "id": "sv_9f3c2a7b", "plan": "pro", "state": "provisioning" } }
// other actions -d '{"action":"stop"}' -d '{"action":"start"}' -d '{"action":"reboot"}'
DELETE/v1/servers/{id}
Destroy a server. This terminates the underlying instance and stops its billing. This is how you cancel — there is nothing else to do.
$ curl -X DELETE https://caiport.com/v1/servers/sv_9f3c2a7b \ -H "Authorization: Bearer aisk_live_…" → { "data": { "id": "sv_9f3c2a7b", "state": "terminated" } }
Domains & DNS
Register domains and have managed DNS set up automatically. Amounts are in cents AUD.
POST/v1/domains/check
Check availability and price for a domain.
$ curl -X POST https://caiport.com/v1/domains/check \ -H "Authorization: Bearer aisk_live_…" \ -d '{"domain":"mybusiness.com.au"}' → { "data": { "available": true, "domain": "mybusiness.com.au", "price_cents": 1995, "currency": "AUD" } }
POST/v1/domains
Register a domain. We create a managed DNS hosted zone, point the registrar's nameservers at it, and return the domain record.
$ curl -X POST https://caiport.com/v1/domains \ -H "Authorization: Bearer aisk_live_…" \ -d '{"domain":"mybusiness.com.au","years":1}' → { "data": { "id": "dm_…", "domain": "mybusiness.com.au", "status": "active", "nameservers": ["ns-…awsdns…", …], "hosted_zone": true } }
GET/v1/domains · GET/v1/domains/{id}
List your domains, or fetch one.
POST/v1/domains/{id}/connect
Point a domain at one of your servers — creates/updates the managed DNS A records for the apex and www.
$ curl -X POST https://caiport.com/v1/domains/dm_…/connect \ -H "Authorization: Bearer aisk_live_…" \ -d '{"server_id":"sv_9f3c2a7b"}'
GET/v1/domains/{id}/dns · POST/v1/domains/{id}/dns
List DNS records, or upsert one (A, AAAA, CNAME, TXT, MX).
$ curl -X POST https://caiport.com/v1/domains/dm_…/dns \ -H "Authorization: Bearer aisk_live_…" \ -d '{"name":"blog.mybusiness.com.au","type":"A","value":"13.55.1.2","ttl":300}'
DELETE/v1/domains/{id}
Remove a domain from your account and delete its DNS zone.
Errors
Errors return the relevant HTTP status with a JSON body of the form {"error":"…"}.
{ "error": "Invalid or missing API key" }
| Status | Meaning |
|---|---|
401 | Unauthorized — the API key is missing or invalid. |
402 | Payment required — add a payment method before deploying. |
403 | Forbidden — server limit or spend cap exceeded. |
404 | Not found — no such server or resource. |
Rate limits
The API has generous per-hour rate limits that comfortably cover normal automation and fleet management. If you hit a limit you'll receive an HTTP 429 with a {"error":"…"} body — back off and retry shortly. Need higher limits for a large fleet? Get in touch.
Build on it
Create an account, generate an API key, and deploy your first server with a single curl.
Get an API key →