API guides
Conventions
Ids, dates, money, validation, pagination, roles and long-running operations.
๐จ Requests
- HTTPS and JSON. Send request bodies as JSON with
Content-Type: application/json, and expect JSON back (except file downloads, the agent installer and streams). - No body, no content type. For a
POSTwithout a body (for example starting a deploy), do not sendContent-Type: application/jsonโ an empty JSON body is rejected with400 FST_ERR_CTP_EMPTY_JSON_BODY. Either send noContent-Type, or send{}. - Uploads use
multipart/form-dataโ database imports and the file manager, up to 512 MB per file. - UTF-8 everywhere.
๐ข Ids, names and dates
| Value | Format | Example |
|---|---|---|
| Ids of sites, servers, deployments, invoices โฆ | integer | 12 |
| Timestamps | ISO 8601 in UTC, with milliseconds | "2026-11-27T10:00:00.000Z" |
| Release names | YYYYMMDDHHMMSS, 14 digits |
"20261127093000" |
| Fleet metric samples | Unix seconds in ts, plus an ISO at |
1795773600 |
| Backup files | <database>_<UTC time>.sql.gz |
"shop_2026-11-27T10-00-00.sql.gz" |
| Secret tokens in URLs | random hexadecimal strings | status pages, the client portal, push-to-deploy |
๐ฑ Money
Billing amounts are integers in minor units โ cents or tetri โ never floating-point numbers: 3000 is 30.00. Where an endpoint also accepts a string, it is read in major units: "30.50" is 3050. The reference marks which endpoints accept both. Currencies are GEL, USD and EUR.
โ Validation
- Parameters with a schema are validated before the handler runs; a violation returns
400with"code": "FST_ERR_VALIDATION"and a message that names the field, such asbody/release must match pattern "^\d{14}$". - Unknown fields are removed silently from validated bodies โ a misspelled field is ignored, not rejected. Check field names against the reference.
- Query strings are converted to the declared type:
?limit=50becomes a number. Flags that are documented as"1"(for exampleskipTests=1) only recognise that exact value. - A few endpoints read their body without a schema; their fields are marked not validated in the reference.
- Some stored fields are JSON inside a string โ a site's
tagsandsecIpList, for example. The reference notes each one; parse them on your side.
๐ Lists and pagination
Most list endpoints return the whole list (sites, servers, users โฆ) or a fixed number of the newest items (a site's last 20 deployments, the last 50 failed jobs). The endpoints that page their results:
| Endpoint | Parameters |
|---|---|
GET /api/audit |
limit (default 50, max 200), offset |
GET /api/mcp-activity |
limit (default 100, max 500) |
GET /api/ai/history |
limit (default 30, max 100), cursor |
GET /api/fleet/runs |
limit (default 30, max 100), cursor |
GET /api/fleet/alerts |
limit (default 100, max 500) |
GET /api/fleet/servers/{id}/processes |
limit (default 50, max 100) |
GET /api/monitor/processes |
limit (default 8, max 25) |
With a cursor, pass the value from the previous response to get the next, older page.
๐ Permissions
Every endpoint in the reference shows its requirements as badges:
| Badge | Meaning |
|---|---|
| Token or session | Call it with a personal access token. |
| Browser session only | Only the panel's own login session works (WebSockets). |
| Any role / Admin / Admin ยท Developer | The roles that may call it. |
| Needs site access | Non-admins need access to the site in the URL. Viewers may read but never change. |
| No access tokens | Tokens are refused โ a person must do it in the browser. |
| 2FA step-up | Needs a fresh two-factor confirmation in the browser session. |
A request that fails these checks gets 401 or 403 โ see Errors.
โณ Long-running operations
Deploys, certificates, server preparation and similar work take seconds to minutes, so these endpoints start the work and return at once:
| Operation | Start | Follow |
|---|---|---|
| Deploy, redeploy, rollback | POST /api/sites/{id}/deploy โฆ |
GET /api/sites/{id}/deploy/stream, or GET /api/sites/{id} โ deployments |
| Provision a site | POST /api/sites/{id}/provision |
GET /api/sites/{id}/provision/stream |
| Issue or renew a certificate | POST /api/sites/{id}/ssl โฆ |
GET /api/sites/{id}/ssl/stream |
| Artisan command | POST /api/sites/{id}/artisan/run |
GET /api/sites/{id}/artisan/stream |
| Prepare a server | POST /api/servers/{id}/prepare |
GET /api/servers/{id}/prepare/stream |
| Fleet action or command run | POST /api/fleet/servers/{id}/actions, POST /api/fleet/runs |
GET /api/fleet/runs/{id}, GET /api/fleet/runs/{id}/stream |
| Panel update | POST /api/system/update/start |
GET /api/system/update/status |
Queues and conflicts
- Deploys queue. Starting a deploy while one is running returns
{"queued": true, "message": "โฆ"}instead of adeploymentId. The queue holds one follow-up deploy per site: several queued requests become a single deploy of the branch head (withoutreforskipTests). - Other operations refuse. A second certificate request, Artisan command, provisioning or rollback while one is running gets
409โ wait for the first to finish. - Duplicates โ a domain, preset name, script name, user email or subscription that already exists โ also return
409.
Status values
| Resource | Values |
|---|---|
Deployment status |
running, success, failed |
Site status |
pending, provisioning, active, error |
Fleet run target status |
pending, running, success, failed, timeout, offline, denied, cancelled |
Uptime status |
up, down, unknown |
Invoice status |
open, partial, paid, overdue, void |
๐งพ Everything is recorded
Privileged actions write an entry to the audit log โ the reference shows the action name on each endpoint โ and every request made with a personal access token is listed on the AI Activity page.
๐ Secrets in responses
Secrets you send are never sent back: Git tokens become hasGitToken, and write-only settings (API keys, webhook URLs, passwords) are returned masked. Some values that work like passwords are returned to callers who may read the resource โ a site's push-to-deploy webhookToken and statusPageToken, for example โ so treat API responses as confidential and do not log them in full.