Servers

API usage instructions for listing, provisioning, managing, and deleting servers.

GET List Servers

/api/v1/servers

To list all the servers, send a GET request to /api/v1/servers.

GET Retrieve an Existing Server

/api/v1/servers/SERVER_UUID

To retrieve information about an existing server, send a GET request to /api/v1/servers/SERVER_UUID.

POST Generate Custom Server SSH Key

/api/v1/servers/custom-key

To generate or reuse the custom server SSH public key, send a POST request to /api/v1/servers/custom-key. Call this before provisioning a custom server. A second call returns the same key. The private key is never returned.

Use install_command from the response on the target server before provisioning.

POST Provision a Cloud Server

/api/v1/servers

To provision a server with a VPS provider, send a POST request to /api/v1/servers. Fetch profile, slug, region, and version from the VPS Profiles endpoints. Returns 202.

serverName must be unique for the account. version must be in that profile’s supported_versions (typically 22.04 or 24.04). Do not send ipAddress on a cloud provision.

serverType values: app, adonis, laravel, nodejs, wordpressWithMysql, wordpressWithMariadb, database, balancer, plain.

For serverType: "database", also send minionPrefs.databaseServer with a database service id (mysql80, mariadb1011, postgresql13, and the other values listed under Database engine on the Sites page).

{
  "serverType": "database",
  "minionPrefs": {
    "databaseServer": "mysql80"
  }
}

POST Provision a Custom Server

/api/v1/servers

To provision a custom server, send a POST request to /api/v1/servers with isCustom set to true. Generate and install the custom SSH key first. Do not send profile, slug, or region. Returns 202.

PATCH Start or Stop a Server

/api/v1/servers/SERVER_UUID/perform-action

To start or stop a server, send a PATCH request to /api/v1/servers/SERVER_UUID/perform-action. action must be start or stop. Only UpCloud servers support this. Custom servers and other providers return 422.

DELETE Delete a Server

/api/v1/servers/SERVER_UUID

To delete a server, send a DELETE request to /api/v1/servers/SERVER_UUID. Returns 202.

To continue deletion when the provider delete fails, add forceForget=true:

curl -X DELETE "https://app.cleavr.io/api/v1/servers/SERVER_UUID?forceForget=true" \
  -H "Authorization: Bearer cleavr_YOUR_TOKEN"

The response then tells you to confirm deletion in the provider.