Reference

API reference

REST endpoints, authentication, rate limits, and common patterns. Full reference for integrations and the CLI.

Base URL

https://$APP_DOMAIN/api

Authentication

All endpoints except /api/health and /api/auth/telegram require Authorization: Bearer <jwt>.

Obtain a JWT by posting Telegram initData:

POST /api/auth/telegram
{ "initData": "" }
→ 200 { "token": "", "user": { ... } }

Response headers

Core endpoints

Servers

MethodPathDescription
GET/serversList servers visible to the caller
POST/serversCreate server (caller becomes owner)
GET/servers/:idGet single server (viewer+)
PUT/servers/:idUpdate server (admin+)
DELETE/servers/:idDelete server (owner only)
POST/servers/:id/testTest SSH connection

Access control

MethodPathDescription
GET/servers/:id/accessList members (admin+)
POST/servers/:id/accessGrant access (owner only)
PUT/servers/:id/access/:userIdChange role (owner only)
DELETE/servers/:id/access/:userIdRevoke access (owner only)

OpenClaw

Base: /servers/:id/openclaw. Sub-resources: agents, sessions, skills, config, status, restart, dashboard-url. See backend/src/routes/openclaw.ts for the full list.

Setup wizard

Base: /servers/:id/setup. Endpoints: check-prereqs, install-node, install-openclaw, onboard, configure-gateway, systemd, verify-health, create-default-agent, check-updates, update-component.

RAG

Base: /servers/:id/rag. Endpoints: install (task), health, connections, and per-agent: agents/:agentId/configure, .../files, .../reindex, .../query, .../enable-skill, .../disable-skill, .../export, .../disconnect, DELETE .../agents/:agentId. Plus Ollama helpers: ollama/status, ollama/install (task), ollama/pull-model (task).

Tasks

MethodPathDescription
GET/tasks/:idGet task state + steps
GET/tasks/active?type=X&serverId=YFind active task for reconnection
GET/tasks/active-server?serverId=YList all active tasks for a server

Admin (super-admin only)

MethodPathDescription
GET/admin/health/detailedDB status, memory, monitor, tasks, backup health
GET/admin/backupsList retained backups
POST/admin/backups/runTrigger manual backup
GET/admin/backups/download/:filenameDownload a gzipped backup
GET/admin/auditQuery audit log with filters

User preferences

MethodPathDescription
GET/me/notification-prefsGet your mute / quiet-hours settings
PUT/me/notification-prefsUpdate your preferences

Error responses

All errors are JSON: {"error": "human-readable message"}. Common status codes: