API reference

API reference

Every endpoint, with the scope it needs and the fields it takes. Developer documentation is in English.

Overview

Base URL https://api.cloud.clk.no/v1. Authenticate with Authorization: Bearer clk_live_…. Each endpoint shows the scope the key needs. New to the API? Start with the guide.

Machine-readable: OpenAPI 3 spec (JSON), for client generators, Postman and AI agents.

Account

Check who a key belongs to and what it may do.

GET/v1/me

The organization, key id, scopes and caps (maxServers, maxMonthlyEur) of the key you are calling with.

Parameters and fields

Response (KeyInfo)

FieldType
organizationIdstring (uuid)required
keyIdstring (uuid)required
scopesstring[]required

Servers

Create, inspect and control servers. Anything slow (create, start, stop, reboot, delete) returns 202 and a job.

GET/v1/serversservers:read

List servers. Filter with one or more label=key:value query parameters.

Parameters and fields

Parameters

NameInType
labelquerystring[]

Response (Server[])

FieldType
idstringrequired
namestringrequired
statestringrequired
ipAddressstring
networkNetworkRef
sshKeystring
sizestringrequired
vcpusintegerrequired
memoryMbintegerrequired
diskGbinteger
imagestringrequired
regionstringrequired
labelsmap<string, string>required
createdAtstringrequired
POST/v1/servers202 · returns a jobservers:write

Create a server. name, size and labels are required. network and sshKey may be omitted when the organization has exactly one of each; userData is cloud-init. Optional ttl (30m, 2h, 7d; 5 minutes to 30 days) deletes the server automatically when it is over. Optional diskGb sets a larger root disk (extra GB are billed per GB), and publicIpv4: true orders a dedicated public IPv4 attached when the server is ready.

Parameters and fields

Request body

FieldType
namestringrequired
sizestringrequired
sshKeystring
networkstring
imagestring
userDatastring
labelsmap<string, string>required

Response (JobAccepted)

FieldType
jobIdstring (uuid)required
jobUrlstringrequired
GET/v1/servers/{id}servers:read

One server, including state, IP address, size and labels.

Parameters and fields

Parameters

NameInType
idpathstringrequired

Response (Server)

FieldType
idstringrequired
namestringrequired
statestringrequired
ipAddressstring
networkNetworkRef
sshKeystring
sizestringrequired
vcpusintegerrequired
memoryMbintegerrequired
diskGbinteger
imagestringrequired
regionstringrequired
labelsmap<string, string>required
createdAtstringrequired
DELETE/v1/servers/{id}202 · returns a jobservers:write

Delete a server.

Parameters and fields

Parameters

NameInType
idpathstringrequired

Response (JobAccepted)

FieldType
jobIdstring (uuid)required
jobUrlstringrequired
POST/v1/servers/{id}/start202 · returns a jobservers:write

Start a stopped server.

Parameters and fields

Parameters

NameInType
idpathstringrequired

Response (JobAccepted)

FieldType
jobIdstring (uuid)required
jobUrlstringrequired
POST/v1/servers/{id}/stop202 · returns a jobservers:write

Stop a server.

Parameters and fields

Parameters

NameInType
idpathstringrequired

Response (JobAccepted)

FieldType
jobIdstring (uuid)required
jobUrlstringrequired
POST/v1/servers/{id}/reboot202 · returns a jobservers:write

Reboot a server.

Parameters and fields

Parameters

NameInType
idpathstringrequired

Response (JobAccepted)

FieldType
jobIdstring (uuid)required
jobUrlstringrequired
PUT/v1/servers/{id}/labelsservers:write

Replace the labels on a server. Labels drive filtering and cost reports (up to 20 per server).

Parameters and fields

Parameters

NameInType
idpathstringrequired

Request body

FieldType
labelsmap<string, string>required

Catalog

What you can create servers from. Sizes include the monthly price (excl. VAT).

GET/v1/sizesservers:read

Server sizes with vCPU, memory, disk and monthly price.

Parameters and fields

Response (Size[])

FieldType
idstringrequired
namestringrequired
vcpusintegerrequired
memoryMbintegerrequired
diskGbintegerrequired
monthlyPricePrice
GET/v1/imagesservers:read

Operating system images (Ubuntu, Debian, Rocky and others) and your own images (custom: true).

Parameters and fields

Response (Image[])

FieldType
idstringrequired
namestringrequired
descriptionstring
defaultbooleanrequired
POST/v1/images202 · returns a jobservers:write

Make an image from a server, with your tools already installed, and start new servers from it. Body: { "serverId", "name" }. Not enabled yet: answers 404 not_available.

DELETE/v1/images/{id}202 · returns a jobservers:write

Delete one of your own images.

GET/v1/regionsservers:read

Regions.

Parameters and fields

Response (Region[])

FieldType
idstringrequired
namestringrequired
GET/v1/networksnetworks:read

Your private networks.

Parameters and fields

Response (Network[])

FieldType
idstring (uuid)required
namestringrequired
cidrstringrequired
statestringrequired

SSH keys

Public keys injected into servers when they are created.

GET/v1/ssh-keysssh-keys:read

List SSH keys.

Parameters and fields

Response (SshKey[])

FieldType
namestringrequired
fingerprintstringrequired
POST/v1/ssh-keysssh-keys:write

Add a public key. Returns 201.

Parameters and fields

Request body

FieldType
namestringrequired
publicKeystringrequired

Response (SshKey)

FieldType
namestringrequired
fingerprintstringrequired
DELETE/v1/ssh-keys/{name}ssh-keys:write

Remove a key by name.

Parameters and fields

Parameters

NameInType
namepathstringrequired

IP addresses

Public IPv4 addresses (billed per month, limited per organization) that you can attach to a server and move between servers, for example for failover. IPv6 is included with every server.

GET/v1/ip-addressesips:read

List addresses and the server each is attached to.

POST/v1/ip-addresses202 · returns a jobips:write

Take a new address. Optional network when you have more than one.

POST/v1/ip-addresses/{id}/assignips:write

Attach the address to a server (1:1). Unassign it first to move it. Body: { "serverId": "…" }.

POST/v1/ip-addresses/{id}/unassign202 · returns a jobips:write

Detach the address from its server. It stays yours.

DELETE/v1/ip-addresses/{id}202 · returns a jobips:write

Release the address.

Volumes and snapshots

Extra disks and backups of them. Not enabled yet: until they are, these endpoints answer 404 not_available.

GET/v1/volumesvolumes:read

List volumes.

POST/v1/volumesvolumes:write

Create a volume (name, sizeGb, optional labels, serverId to attach, or snapshotId to restore). Returns 201 when ready.

POST/v1/volumes/{id}/attachvolumes:write

Attach to a server. Body: { "serverId": "…" }.

POST/v1/volumes/{id}/detachvolumes:write

Detach from its server.

DELETE/v1/volumes/{id}volumes:write

Delete a detached volume and its data.

GET/v1/snapshotsvolumes:read

List snapshots.

POST/v1/volumes/{id}/snapshotsvolumes:write

Snapshot a volume. Returns 201.

DELETE/v1/snapshots/{id}volumes:write

Delete a snapshot.

Jobs

Every slow operation is a job. Poll it, or subscribe to webhooks instead.

GET/v1/jobs/{id}jobs:read

Job status: pending until it ends as succeeded or failed (error holds the reason). When a server job has succeeded, serverId is the server it concerns.

Parameters and fields

Parameters

NameInType
idpathstring (uuid)required

Response (Job)

FieldType
idstring (uuid)required
typestringrequired
statusstringrequired
errorstring
createdAtstring (date-time)

Events and webhooks

The same events are available by polling and as signed webhook deliveries.

GET/v1/eventsevents:read

Events for your organization after a cursor: pass after=<last event id>, optionally type= and limit=.

Parameters and fields

Parameters

NameInType
afterquerystring (uuid)
typequerystring
limitqueryinteger

Response (EventPage)

FieldType
dataEvent[]required
hasMorebooleanrequired
GET/v1/webhookswebhooks:read

List webhook endpoints.

Parameters and fields

Response (WebhookEndpoint[])

FieldType
idstring (uuid)required
urlstringrequired
descriptionstring
eventTypesstring[]required
enabledbooleanrequired
failingSincestring (date-time)
createdAtstring (date-time)required
POST/v1/webhookswebhooks:write

Register an https endpoint and the event types it wants. The signing secret is returned once.

Parameters and fields

Request body

FieldType
urlstringrequired
descriptionstring
eventTypesstring[]required

Response (CreatedWebhookEndpoint)

FieldType
endpointWebhookEndpointrequired
secretstringrequired
DELETE/v1/webhooks/{id}webhooks:write

Remove an endpoint.

Parameters and fields

Parameters

NameInType
idpathstring (uuid)required

Costs and invoices

Needs a key with the billing:read scope (the admin role).

GET/v1/usagebilling:read

Costs for a month. period=2026-10, group_by=label:env or group_by=type.

Parameters and fields

Parameters

NameInType
periodquerystring
group_byquerystring

Response (MonthCosts)

FieldType
periodstringrequired
currencystringrequired
fromstring (date-time)required
tostring (date-time)required
totalnumberrequired
forecastnumber
resourcesCostResource[]required
groupsCostGroup[]required
dailyDayTotal[]required
GET/v1/invoicesbilling:read

List invoices.

Parameters and fields

Response (Invoice[])

FieldType
idstringrequired
numberstring
periodstring
currencystringrequired
subtotalnumberrequired
taxnumberrequired
totalnumberrequired
statusstringrequired
hostedInvoiceUrlstring
pdfUrlstring
createdAtstring (date-time)required
dueAtstring (date-time)
paidAtstring (date-time)
GET/v1/invoices/{id}billing:read

One invoice, with links to the hosted page and PDF.

Parameters and fields

Parameters

NameInType
idpathstringrequired

Response (Invoice)

FieldType
idstringrequired
numberstring
periodstring
currencystringrequired
subtotalnumberrequired
taxnumberrequired
totalnumberrequired
statusstringrequired
hostedInvoiceUrlstring
pdfUrlstring
createdAtstring (date-time)required
dueAtstring (date-time)
paidAtstring (date-time)