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

POST Create new PHP Site

/api/v1/sites

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.

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.

POST Create new Nuxt Static Site

/api/v1/sites

site_type_version: 2, 3, 4.

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.

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:

  • 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.