API reference
Public and internal
Endpoints that need no login, and the loopback-only internal endpoint.
Public
Endpoints that need no login: health, status pages and the client portal.
/api/public/status/{token}
Get a public status page
Unauthenticated status-page data for one site, found by its status page token (the page must be enabled). Covers the last 90 days of uptime checks: current state, overall uptime %, average response time, per-day uptime and the last 10 incidents.
- Secret in URL
Path parameters
tokenstringrequired- The site's status page token.at least 8 chars
Errors
- 404
Not foundThe token is shorter than 8 chars, unknown, or the site's status page is disabled.
- current is the status of the latest check, or "unknown" when there are no checks. overallPct and avgMs are null without data.
- Incidents are runs of consecutive non-up checks; from/to are the first and last failing check times. Newest first, max 10.
- Only the global rate limit (600 requests per minute per IP) applies.
curl "https://panel.example.com/api/public/status/3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b"{
"domain": "shop.example.com",
"name": "Shop",
"current": "up",
"overallPct": 99.8,
"avgMs": 184,
"days": [
{
"date": "2026-11-26",
"upPct": 100
},
{
"date": "2026-11-27",
"upPct": 99.3
}
],
"incidents": [
{
"from": "2026-11-27T03:10:00.000Z",
"to": "2026-11-27T03:15:00.000Z"
}
]
}
/api/portal/{token}
Get the client portal
Read-only billing portal for one client, found by the client's portal token. Returns the client's name and currency, their active sites with uptime, the outstanding balance and their invoices (latest 50, without drafts and voided ones) with payments. Amounts are integers in minor units (e.g. tetri, cents) plus formatted strings.
- Secret in URL
Path parameters
tokenstringrequired- The client's portal token.at least 24 chars
Errors
- 404
Not foundToken shorter than 24 chars, unknown, client archived, or the client has no subscription that is not cancelled.
- invoices[].status is one of open, partial, paid, overdue (draft and void are filtered out). payments[] items have amount, amountFormatted, method (cash | bank_transfer | card | other) and receivedAt.
- sites[].active is false when the subscription's enforcement level is suspend or archived; the internal level itself is not exposed. uptime24h is null without checks in the last 24 h.
- Only the global rate limit (600 requests per minute per IP) applies.
curl "https://panel.example.com/api/portal/3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b"{
"client": {
"name": "Ada Lovelace",
"company": "Example Ltd",
"locale": "en",
"currency": "GEL"
},
"sites": [
{
"domain": "shop.example.com",
"active": true,
"amountFormatted": "30.00 โพ",
"nextInvoiceAt": "2026-12-01T00:00:00.000Z",
"uptime24h": 100,
"currentStatus": "up",
"lastCheckedAt": "2026-11-27T10:00:00.000Z"
}
],
"outstanding": 3000,
"outstandingFormatted": "30.00 โพ",
"invoices": [
{
"number": "INV-2026-0042",
"periodStart": "2026-11-01T00:00:00.000Z",
"periodEnd": "2026-11-30T23:59:59.000Z",
"dueDate": "2026-11-10T00:00:00.000Z",
"status": "open",
"amount": 3000,
"amountPaid": 0,
"balance": 3000,
"currency": "GEL",
"amountFormatted": "30.00 โพ",
"balanceFormatted": "30.00 โพ",
"paidAt": null,
"payments": []
}
]
}
/api/portal/{token}/support
Send a support request
Lets a client send a support message from the portal. It is stored as an in-panel notification (type support) for the operator.
- Secret in URL
- โฑ 5 per hour per IP
- Audit:
portal.support
Path parameters
tokenstringrequired- The client's portal token.at least 24 chars
Body
subjectstring- Optional subject, prepended to the message.max 200 chars
messagestringrequired- The request text.1โ2000 chars
Errors
- 404
Not foundToken invalid, client archived, or no active billing.- 429
Rate limit exceeded, retry in โฆToo many requests โ see the Retry-After header.
- A failure to store the notification is swallowed; the response is still {"ok": true}.
- The notification title is "Support request โ <client name>".
curl -X POST "https://panel.example.com/api/portal/3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b/support" \
-H "Content-Type: application/json" \
-d '{
"subject": "Checkout page is slow",
"message": "Since this morning the checkout takes about 10 seconds to load."
}'{
"ok": true
}
/api/portal/{token}/backups
List the client's backups
Lists the database backup files (*.sql or *.sql.gz in <rootPath>/backups) of each of the client's active sites hosted on the panel host, newest first, max 20 per site.
- Secret in URL
Path parameters
tokenstringrequired- The client's portal token.at least 24 chars
Errors
- 404
Not foundToken invalid, client archived, or no active billing.
- Sites on remote servers are omitted entirely. A site without a backups directory is listed with an empty files array. Only names matching ^[\w.\-]+\.sql(\.gz)?$ are listed.
curl "https://panel.example.com/api/portal/3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b/backups"{
"sites": [
{
"siteId": 12,
"domain": "shop.example.com",
"files": [
{
"filename": "shop_2026-11-27.sql.gz",
"sizeBytes": 4821033,
"createdAt": "2026-11-27T03:00:00.000Z"
}
]
}
]
}
/api/portal/{token}/backups/{siteId}/{filename}
Download a backup
Streams one backup file of one of the client's own active sites (panel host only) as an attachment.
- Secret in URL
- Audit:
portal.backup_download
Path parameters
tokenstringrequired- The client's portal token.at least 24 chars
siteIdintegerrequired- Id of one of the client's sites (from the backups list).
filenamestringrequired- Backup file name (from the backups list).pattern ^[\w.\-]+\.sql(\.gz)?$
Errors
- 400
Invalid filenamefilename does not match the backup pattern.- 404
Not foundToken invalid, the site is not one of the client's active sites, the site is on a remote server, or the file does not exist.
- Content-Type is always application/gzip, also for uncompressed .sql files.
curl "https://panel.example.com/api/portal/3f9c2a7b1d4e8f6a0c5b9d2e7f1a4c8b/backups/12/shop_db_2026-11-27T03-00-00.sql.gz"The file bytes with Content-Disposition: attachment; filename="<filename>" and Content-Length.
Internal
Loopback-only endpoints. Not reachable from outside the panel host.
/api/internal/pma-consume
Redeem a phpMyAdmin sign-on token
Called by the phpMyAdmin sign-on bridge (scripts/phpmyadmin-signon.php) on the same host to exchange a one-time token for the MySQL credentials it stands for. Tokens are single-use, kept in memory and expire 60 seconds after issue.
- Loopback only
Headers
X-Pma-Bridge-Secretstringrequired- Shared secret; must equal the PMA_BRIDGE_SECRET environment variable (constant-time comparison).
Body
tokenstringrequired- The one-time token issued by the panel when a user opens phpMyAdmin.not validated
Errors
- 400
Missing tokentoken is missing or not a string.- 403
ForbiddenThe TCP peer or request.ip is not loopback (127.0.0.1, ::1, ::ffff:127.0.0.1), or the secret header is missing or wrong.- 404
Invalid or expired tokenUnknown, already used or expired token.- 503
PMA_BRIDGE_SECRET is not configured.The environment variable is not set.
- nginx blocks /api/internal/ publicly (location ^~ /api/internal/ returns 404), so this endpoint is only reachable directly on 127.0.0.1:<API port>, not through the panel's public URL.
- Not behind app.authenticate; protected by the loopback check plus the shared secret.
- The token is deleted on the first lookup, even if it turns out to be expired.
- A request without a JSON body has no body object and fails with Fastify's default 500 error rather than 400.
curl -X POST "https://panel.example.com/api/internal/pma-consume" \
-H "X-Pma-Bridge-Secret: value" \
-H "Content-Type: application/json" \
-d '{
"token": "9f2c4e7a1b3d5f6e8a0c2e4f6a8b0d1e3f5a7c9e1b3d5f7a9c1e3f5a7b9d1c3e"
}'{
"host": "127.0.0.1",
"user": "shop_user",
"pass": "example-password",
"db": "shop_db"
}