Clouzark

Management API

Automate Clouzark over HTTP.

The CLI and MCP server are built on this API; anything they do, you can do with plain HTTP.

https://api.clouzark.com/v1

Authentication

Send a team access token, created under the team's Settings → Access Tokens (or by clouzark login):

curl https://api.clouzark.com/v1/me -H "Authorization: Bearer cz_pat_..."

A token acts with its creator's current role in the team. Requests and responses are JSON, errors are { "error": "..." }, and each token can make 120 requests a minute. Wherever a path has :ref, pass a project's slug or id.

Account

Request
GET /meUser, team, role, and token expiry
DELETE /tokens/currentRevoke the calling token

Hosting projects

Request
GET /projectsList projects
GET /projects/:refOne project
POST /projects { repo, name?, root_directory?, framework?, production_branch?, install_command?, build_command?, output_directory? }Import a GitHub repo (owner/name) and queue its first production build; returns { project, deployment_id }
GET /projects/:ref/deployments?limit=20Recent deployments
POST /projects/:ref/deployments { branch? }Build a branch's latest pushed commit (the production branch by default)
POST /projects/:ref/deployments/upload?environment=previewBuild an uploaded .tar.gz of the project (Content-Type: application/gzip)
POST /projects/:ref/rollbackRoll production back
GET /deployments/:id?log_offset=0Deployment status, plus build log from log_offset
POST /deployments/:id/promotePromote to production
POST /deployments/:id/redeployRebuild
POST /deployments/:id/cancelCancel a queued deployment

A deployment's status is one of queued, building, deploying, live, failed, canceled, or stopped; done is true once it stops changing. To follow a build, poll GET /deployments/:id and pass the previous log_length as log_offset.

Environment variables

Request
GET /projects/:ref/envNames and targets
GET /projects/:ref/env/values?environment=previewResolved values for one environment
POST /projects/:ref/env { key, value, target }Add or update
DELETE /projects/:ref/env/:key?target=allRemove

Domains

Request
GET /projects/:ref/domainsDomains, with the DNS records each needs
POST /projects/:ref/domains { hostname }Add
POST /projects/:ref/domains/:hostname/verifyCheck DNS
DELETE /projects/:ref/domains/:hostnameRemove

Database projects

Request
GET /database-projectsList databases
GET /database-projects/:refOne database
POST /database-projects { name }Create
DELETE /database-projects/:refDelete permanently
POST /database-projects/:ref/query { sql, read_only? }Run SQL; returns { command, row_count, fields, rows, duration_ms }
GET /database-projects/:ref/migrationsApplied migrations
POST /database-projects/:ref/migrations { version, name, sql }Apply a migration. version is YYYYMMDDHHMMSS; re-sending the same SQL is a no-op, different SQL for an applied version is a 409
GET /database-projects/:ref/types/typescript{ types }
GET /database-projects/:ref/keys{ rest_url, anon_key, service_key }
GET /database-projects/:ref/credentialsHost, port, database, username, password, and connection string

On this page