Admin API
The admin API operates on the fleet. It requires an operator session or — preferably — a scoped API key. Every write is written to the audit log with the key or operator identity.
Endpoints
| Method | Path | Scope |
|---|---|---|
GET | /api/admin/users | users:read |
POST | /api/admin/users | users:write |
GET | /api/admin/users/{id} | users:read |
PATCH | /api/admin/users/{id} | users:write |
POST | /api/admin/users/{id}/suspend | users:write |
GET | /api/admin/nodes | nodes:read |
POST | /api/admin/nodes | nodes:write |
GET | /api/admin/packages | packages:read |
POST | /api/admin/packages | packages:write |
GET | /api/admin/orders | orders:read |
POST | /api/admin/orders/{id}/refund | orders:write |
GET | /api/admin/api-keys | keys:read |
POST | /api/admin/api-keys | keys:write |
GET | /api/admin/logs | logs:read |
List users
GET /api/admin/users?status=active&package=business&per_page=50
Authorization: Bearer <api-key>{
"ok": true,
"data": [
{
"id": 1042,
"email": "owner@acme.example",
"package": "business",
"node": "fra-01",
"status": "active",
"usage": { "disk_gb": 12.4, "sites": 6, "databases": 9, "mailboxes": 18 },
"created_at": "2026-04-11T08:20:00Z"
}
],
"meta": { "page": 1, "per_page": 50, "total": 1 }
}Create a user
POST /api/admin/users
Idempotency-Key: 9b2f1c4d-6a3e-4f8b-9d1c-7e5a2b6f8c30
{
"email": "new@acme.example",
"package": "business",
"node": "fra-01",
"send_invite": true
}The request returns 201 with the account object and a provisioning status. Poll the user record until status becomes active.
Suspend and restore
POST /api/admin/users/1042/suspend
{ "reason": "overdue_invoice" }PATCH /api/admin/users/1042
{ "status": "active" }Suspension stops websites and mail but keeps data. The reason is stored internally and included in the audit entry.
Nodes
GET /api/admin/nodes{
"ok": true,
"data": [
{
"id": "fra-01",
"region": "eu-central",
"state": "healthy",
"capacity": { "cpu": 8, "memory_gb": 32, "disk_gb": 500 },
"usage": { "cpu_pct": 41, "memory_pct": 58, "disk_pct": 63 },
"last_seen": "2026-12-01T09:15:12Z"
}
]
}A node in degraded or offline state should be investigated before scheduling new accounts.
Packages
POST /api/admin/packages
{
"name": "Business",
"price_cents": 2900,
"currency": "USD",
"cycle": "monthly",
"limits": { "disk_gb": 50, "sites": 25, "databases": 50, "mailboxes": 100 },
"features": { "ssh": true, "git_deploy": true, "api": true }
}Package changes do not retroactively rewrite existing accounts unless apply_to_existing is true, which queues a reconciliation job.
Refunds
POST /api/admin/orders/8812/refund
{ "amount_cents": 2900, "reason": "duplicate_charge" }Refunds are idempotent per order and amount. A second identical call returns the original refund rather than issuing a new one.
API keys
POST /api/admin/api-keys
{
"name": "billing-sync",
"scopes": ["orders:read", "users:read"],
"expires_in_days": 90
}The secret is returned exactly once. Store it in a secret manager; the panel keeps only a hash.
Audit log
GET /api/admin/logs?action=user.suspend&from=2026-11-01&to=2026-12-01{
"ok": true,
"data": [
{
"actor": "ops@example.com",
"action": "user.suspend",
"target": "customer:1042",
"before": { "status": "active" },
"after": { "status": "suspended" },
"ip": "203.0.113.9",
"at": "2026-12-01T09:14:22Z"
}
]
}Error handling
Admin writes can fail with scope_missing, forbidden, conflict or provisioning_failed. A provisioning failure includes a job_id; retry with the same idempotency key after correcting the cause.
{
"ok": false,
"error": {
"code": "scope_missing",
"message": "API key lacks users:write",
"request_id": "req_01J8Z5C1"
}
}Related
- API overview for auth and rate limits
- Users & customers for console workflows
- Security & settings for key policy