Sites
API usage instructions for listing, retrieving, creating, and deleting sites on a server.
GET List Sites
/api/v1/sites?server=SERVER_UUID To list all the sites on a server, send a GET request to /api/v1/sites?server=SERVER_UUID.
GET Retrieve an Existing Site
/api/v1/sites/SITE_UUID To retrieve information about an existing site, send a GET request to /api/v1/sites/SITE_UUID.
POST Create Site
/api/v1/sites To create a new site on the server, send a POST request to /api/v1/sites providing the required attributes.
Use the request builder to configure the site you want to create using the API. You can select the app type, service versions, database details, and more. Adjust the settings as needed and copy the generated cURL command.
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
}
}'POST Create new Laravel Site
/api/v1/sites 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
}
}'
POST Create new PHP Site
/api/v1/sites 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
}
}'
POST Create new WordPress Site
/api/v1/sites Always creates a MySQL/MariaDB database.
Skip the WordPress installer: set performInstallSetup to false and remove wpAdminSetup.
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"
}
}
}'
POST Create new phpMyAdmin Site
/api/v1/sites One per server. No wildcard. MySQL/MariaDB only. Creates a user, not a database. Do not send database.
POST Create new Adonis Site
/api/v1/sites site_type_version: 5, 6, 7. Adonis 6 needs Node ≥ 20.x. Adonis 7 needs Node ≥ 24.x.
POST Create new Nuxt SSR Site
/api/v1/sites 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
}
}'
POST Create new Nuxt Static Site
/api/v1/sites site_type_version: 2, 3, 4.
| Version | artifactPath |
|---|---|
| 2 | dist |
| 3 / 4 | .output/public |
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
}
}'
POST Create new Next SSR Site
/api/v1/sites POST Create new NodeJS SSR Site
/api/v1/sites Set artifactPath when the app has a build output directory.
POST Create new NodeJS Static Site
/api/v1/sites Set artifactPath to the build output directory (for example dist).
POST Create new Strapi Site
/api/v1/sites site_type_version: 3, 4, 5.
| Version | artifactPath | typescriptSupport |
|---|---|---|
| 3 | build | not available |
| 4 / 5 | build (or dist when typescriptSupport is true) | available |
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"
}
}'
POST Create new Directus Site
/api/v1/sites site_type_version: 10, 11. directusReleaseType: patch or minor.
POST Create new Generic Port Site
/api/v1/sites port is required.
POST Create new Soketi Site
/api/v1/sites One per server. No wildcard.
POST Create new Static HTML Site
/api/v1/sites Empty webDirectory is the site root. No leading /.
DELETE Delete a Site
/api/v1/sites/SITE_UUID To delete a site, send a DELETE request to /api/v1/sites/SITE_UUID. Returns 202. Send deleteDatabase as true to also delete the site database. Omit it or send false to keep the database.
Adjustments
Skip database setup
On Laravel, PHP, Adonis, Strapi, or Directus, remove from options:
shouldCreateDatabaseAndUserdatabasedatabaseUserdatabasePassworduseCachingSha2PasswordpreferredDbServer
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.