Sites
API usage instructions for listing, retrieving, creating, and deleting sites on a server.
List Sites
To list all the sites on a server, send a GET request to /api/v1/sites?server=SERVER_UUID.
curl "https://app.cleavr.io/api/v1/sites?server=SERVER_UUID" \
-H "Authorization: Bearer cleavr_YOUR_TOKEN"
Retrieve an Existing Site
To retrieve information about an existing site, send a GET request to /api/v1/sites/SITE_UUID.
curl https://app.cleavr.io/api/v1/sites/SITE_UUID \
-H "Authorization: Bearer cleavr_YOUR_TOKEN"
Create Site
To create a new site on the server, send a POST request /api/v1/sites providing the required attributes.
Create new Laravel Site
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "laravel",
"domain": "blog.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"supportsLivewire": false,
"options": {
"phpVersion": "8.5",
"buildCommand": "npm run build",
"enableCache": false,
"shouldCreateDatabaseAndUser": true,
"database": "lara_db_xyz",
"databaseUser": "lara_user_xyz",
"databasePassword": "choose-a-strong-password",
"useCachingSha2Password": false
}
}'
Create new PHP Site
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "php",
"domain": "php.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"phpVersion": "8.5",
"webDirectory": "",
"enableCache": false,
"shouldCreateDatabaseAndUser": true,
"database": "php_db_xyz",
"databaseUser": "php_user_xyz",
"databasePassword": "choose-a-strong-password",
"useCachingSha2Password": false
}
}'
Create new WordPress Site
Always creates a MySQL/MariaDB database.
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "wordpress",
"domain": "wp.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"phpVersion": "8.5",
"enableCache": false,
"shouldCreateDatabaseAndUser": true,
"database": "wp_db_xyz",
"databaseUser": "wp_user_xyz",
"databasePassword": "choose-a-strong-password",
"useCachingSha2Password": false,
"performInstallSetup": true,
"multisite": false,
"wpAdminSetup": {
"username": "admin",
"password": "choose-a-strong-password",
"email": "you@example.com",
"siteTitle": "My Awesome Site"
}
}
}'
Skip the WordPress installer: set performInstallSetup to false and remove wpAdminSetup.
Create new phpMyAdmin Site
One per server. No wildcard. MySQL/MariaDB only. Creates a user, not a database. Do not send database.
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "phpmyadmin",
"domain": "pma.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"phpVersion": "8.2",
"enableCache": false,
"shouldCreateDatabaseAndUser": true,
"databaseUser": "phpmyadmin",
"databasePassword": "choose-a-strong-password",
"useCachingSha2Password": false,
"nginxAuthEnabled": false,
"authUsername": "superhuman",
"authPassword": "choose-a-strong-password",
"authAllowedIps": [],
"authPath": "/"
}
}'
Create new Adonis Site
site_type_version: 5, 6, 7. Adonis 6 needs Node ≥ 20.x. Adonis 7 needs Node ≥ 24.x.
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "adonis",
"domain": "adonis.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"site_type_version": "7",
"portNumber": 7011,
"entryPoint": "server.js",
"entryPointArgs": "",
"nodejsVersion": "24.x",
"enableCache": false,
"enableViteBuildHook": false,
"shouldCreateDatabaseAndUser": true,
"database": "adon_db_xyz",
"databaseUser": "adon_user_xyz",
"databasePassword": "choose-a-strong-password"
}
}'
Create new Nuxt SSR Site
site_type_version: 2, 3, 4
| Version |
entryPoint |
artifactPath |
entryPointArgs |
2 |
.cleavr.runner.js |
.nuxt |
start |
3 / 4
|
.cleavr.runner.mjs |
.output |
"" |
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "nuxtServer",
"domain": "nuxt.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"site_type_version": "4",
"portNumber": 7011,
"entryPoint": ".cleavr.runner.mjs",
"entryPointArgs": "",
"artifactPath": ".output",
"buildCommand": "NITRO_PRESET=cleavr npm run build --production",
"nodejsVersion": "22.x",
"enableCache": false
}
}'
Create new Nuxt Static Site
site_type_version: 2, 3, 4. artifactPath is dist for 2, .output/public for 3 and 4.
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "nuxtStatic",
"domain": "nuxt-static.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"site_type_version": "4",
"buildCommand": "NITRO_PRESET=cleavr npm run generate --fail-on-error",
"artifactPath": ".output/public",
"nodejsVersion": "22.x",
"enableCache": false
}
}'
Create new Next SSR Site
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "nextServer",
"domain": "next.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"portNumber": 3000,
"entryPoint": ".cleavr.runner.js",
"entryPointArgs": "start",
"artifactPath": ".next",
"buildCommand": "npm run build --production",
"nodejsVersion": "22.x",
"enableCache": false
}
}'
Create new NodeJS SSR Site
Set artifactPath when the app has a build output directory.
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "nodejs",
"domain": "node.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"portNumber": 7011,
"entryPoint": "index.js",
"entryPointArgs": "",
"buildCommand": "npm run build --production",
"artifactPath": "",
"nodejsVersion": "22.x",
"enableCache": false
}
}'
Create new NodeJS Static Site
Set artifactPath to the build output directory (for example dist).
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "nodejsStatic",
"domain": "node-static.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"buildCommand": "npm run build --production",
"artifactPath": "",
"nodejsVersion": "22.x",
"enableCache": false
}
}'
Create new Strapi Site
site_type_version: 3, 4, 5. For 4 / 5 with TypeScript, set typescriptSupport to true and artifactPath to dist.
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "strapi",
"domain": "strapi.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"site_type_version": "5",
"portNumber": 7011,
"entryPoint": ".cleavr.runner.js",
"entryPointArgs": "",
"buildCommand": "npm run build --production",
"fileUploadPath": "public/uploads",
"typescriptSupport": false,
"artifactPath": "build",
"nodejsVersion": "22.x",
"enableCache": false,
"shouldCreateDatabaseAndUser": true,
"database": "stra_db_xyz",
"databaseUser": "stra_user_xyz",
"databasePassword": "choose-a-strong-password"
}
}'
Create new Directus Site
site_type_version: 10, 11. directusReleaseType: patch or minor.
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "directus",
"domain": "directus.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"site_type_version": "11",
"portNumber": 7011,
"entryPoint": ".cleavr.runner.js",
"entryPointArgs": "start",
"buildCommand": "npx directus bootstrap",
"artifactPath": "",
"fileUploadPath": "uploads",
"adminEmail": "you@example.com",
"adminPassword": "choose-a-strong-password",
"nodejsVersion": "22.x",
"enableCache": false,
"directusReleaseType": "patch",
"shouldCreateDatabaseAndUser": true,
"database": "dir_db_xyz",
"databaseUser": "dir_user_xyz",
"databasePassword": "choose-a-strong-password"
}
}'
Create new Generic Port Site
port is required.
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "genericPort",
"domain": "port.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"port": 43065,
"enableCache": false
}
}'
Create new Soketi Site
One per server. No wildcard.
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "soketi",
"domain": "soketi.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"soketiId": "ZSuxpDT4",
"soketiKey": "UMbdSJZZDP8D",
"soketiSecret": "p5Pcum2pXmImduYc",
"soketiEnableClientMessages": false,
"port": 6001,
"enableCache": false
}
}'
Create new Static HTML Site
Empty webDirectory is the site root. No leading /.
curl -X POST https://app.cleavr.io/api/v1/sites \
-H "Authorization: Bearer cleavr_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": "SERVER_UUID",
"serverUser": "SERVER_USER_UUID",
"type": "static",
"domain": "static.example.com",
"freeDomain": false,
"ssl": true,
"sslEmail": "you@example.com",
"sslProvider": "letsencrypt",
"options": {
"webDirectory": "",
"enableCache": false
}
}'
Adjustments
Skip database setup
On Laravel, PHP, Adonis, Strapi, or Directus, remove from options:
shouldCreateDatabaseAndUser
database
databaseUser
databasePassword
useCachingSha2Password
preferredDbServer
WordPress always creates a database. phpMyAdmin always creates a user (databaseUser must be phpmyadmin; do not send database).
Temporary domain
Remove: domain, ssl, sslEmail, sslProvider
Set: "freeDomain": true
SSL is issued automatically. 202 includes generated domain and free_domain_base. Sending the removed fields returns 422. Also remove wildcard and dnsProfile.
Wildcard
Custom domain only. Not for phpmyadmin or soketi. provider: cloudflare, digitalocean, porkbun, aws.
Add:
{
"wildcard": true,
"dnsProfile": { "uuid": "DNS_PROFILE_UUID", "provider": "cloudflare" }
}
Optional: "includeWwwSslCert": true to cover www.{domain}. sslProvider may be letsencrypt or zerossl.
Database engine
Do not send preferredDbServer when MySQL/MariaDB or PostgreSQL is already installed.
Adonis, Strapi, and Directus: omit preferredDbServer. Installed Postgres is reused. If Postgres is not installed, postgresql13 is installed.
Laravel, PHP, WordPress, and phpMyAdmin: omit preferredDbServer. Installed MySQL/MariaDB is reused. If none is installed, mysql80 is installed.
Send preferredDbServer only when that family is not installed and you want a specific version. A different version of an already-installed family returns 422. MySQL/MariaDB and PostgreSQL may coexist. WordPress and phpMyAdmin are MySQL/MariaDB only.
Values: mysql82, mysql80, mysql57, mariadb1011, mariadb1010, mariadb107, mariadb106, mariadb104, mariadb102, postgresql17, postgresql15, postgresql14, postgresql13, postgresql12
Database name: letters, numbers, _, $; unique on the server. Database user: unique on the server; must not start with pg_ on PostgreSQL.
PHP and Node
phpVersion: 8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.4, 7.3, 7.2. That version is installed if missing. Other PHP versions on the server are left alone.
nodejsVersion: 24.x, 22.x, 20.x, 18.x, 16.x, 14.x, 12.x. One Node version per server. If Node is already installed, it is reused and nodejsVersion is ignored. Send nodejsVersion only when the server has no Node. An existing Node that is too old for Adonis 6 or 7 may be upgraded.