Documentation

API Reference

Core ServOS REST and WebSocket routes

API Reference

ServOS exposes its control-plane API under /api/v1. Use your own ServOS origin, for example https://servos.example.com/api/v1.

Authentication

Authenticated routes accept the session established by the login flow. Agents use their issued agent credentials. Public bootstrap routes are explicitly called out below; do not assume an unlisted route is public.

Public and authentication routes

MethodRoutePurpose
GET/healthProcess health check (outside /api/v1)
GET/api/v1/health/init-statusInitial-setup status
POST/api/v1/setup-handshakeFirst-run setup handshake
POST/api/v1/auth/exchangeTrade an AuthOS token for a ServOS session
POST/api/v1/auth/logoutEnd the current session

ServOS has no local passwords: sign-in, MFA and password recovery all live in AuthOS (see Authentication). | GET | /api/v1/git/github/manifest/{state} | Hand a GitHub App manifest to GitHub (single-use link) | | GET | /api/v1/git/github/callback | GitHub’s redirect after the App is created | | GET | /api/v1/git/github/setup | GitHub’s redirect after the App is installed | | POST | /api/v1/webhooks/github/{connector_id} | GitHub App webhook (signed with the App’s secret) | | POST | /api/v1/webhooks/{resource_id} | Per-service git webhook (signed with the service’s secret) |

Core resources

All routes below are relative to /api/v1 and require authentication.

MethodRoutePurpose
GET, POST/organizationsList or create organizations
GET, PUT, PATCH, DELETE/organizations/{id}Manage an organization
GET, POST/serversList or create servers
GET, PUT, DELETE/servers/{id}Manage a server
POST/servers/{id}/commissionCommission a server
GET/servers/{id}/statusRead server status
GET/servers/{id}/preflightInspect commissioning risks
GET/servers/{id}/control-stateRead ownership and control state
GET, POST/projectsList or create projects
GET, PUT, DELETE/projects/{id}Manage a project
GET, POST/projects/{project_id}/environmentsList or create environments
GET, PUT, DELETE/environments/{id}Manage an environment
GET/resourcesList resources across the current scope
GET, POST/environments/{env_id}/resourcesList or create environment resources
GET, PUT, DELETE/resources/{id}Manage a resource
POST/resources/{id}/deployStart a deployment
POST/resources/{id}/deploy/sourceUpload and deploy source
POST/resources/{id}/rollbackRoll back a resource
GET/resources/{id}/stackA Compose stack’s services and their state
POST/resources/{id}/stack/{start|stop|restart}?service=Control the stack or one compose service
GET/resources/{id}/stack/logs?service=&tail=Recent stack logs
POST/resources/{id}/takeover/revertHand a taken-over app back to Coolify
POST/resources/{id}/takeover/finishRemove Coolify’s stopped containers
POST/compose/inspectParse a compose file: services, ports, volumes, variables

Git connectors

MethodRoutePurpose
POST/git/github/manifestStart creating a GitHub App; returns the launch URL
GET/git/connectorsList GitHub App connectors with their installations
GET, DELETE/git/connectors/{id}Read or remove a connector
POST/git/connectors/{id}/syncRe-read installations and webhook target from GitHub
GET/git/connectors/{id}/repositoriesRepositories the App can read
GET/git/connectors/{id}/branches?repo=owner/nameBranches of one repository
GET/git/connectors/{id}/inspect?repo=&branch=&path=Detect how a repository builds (compose files, Dockerfiles, languages)
POST/git/connectors/{id}/webhook/claimPoint the App’s webhook at ServOS
POST/git/connectors/import/coolifyAdopt the GitHub Apps Coolify uses on a server

Resources take build_pack (image, dockerfile, nixpacks, compose) and, for stacks, compose: {file, content, project, services: {name: {domains, port}}, volumes, env_scope}. previews_enabled turns on pull request previews.

Coolify takeover

MethodRoutePurpose
GET/servers/{id}/coolify/applicationsCoolify’s apps with ServOS’s plan for each
POST/servers/{id}/coolify/applications/{uuid}/takeoverCreate the ServOS service and (by default) swap

A resource builds through a connector when it is created or updated with git_connector_id and a repo_url on the connector’s GitHub host. Send "git_connector_id": null to stop using one.

Storage, backups, and operations

MethodRoutePurpose
GET, POST/storage-providersList or create storage providers
GET, DELETE/storage-providers/{id}Read or delete a storage provider
GET/storage-providers/{id}/browseBrowse stored objects
POST/backupsCreate a resource backup
GET/resources/{resource_id}/backupsList resource backups
GET/backups/{id}/restore/rehearsalCheck restore readiness
POST/backups/{id}/restoreRestore a backup
GET/resources/{resource_id}/deploymentsList deployment history
GET/deployments/{id}/logsRead deployment logs
GET/metrics/queryQuery metrics

WebSockets and streams

RoutePurpose
wss://HOST/api/v1/terminal?server=UUIDInteractive SSH terminal; optional cols and rows query parameters
wss://HOST/api/v1/resources/{id}/logsLive resource logs
wss://HOST/api/v1/resources/{id}/execInteractive resource shell
wss://HOST/api/v1/deployments/{id}/logs/wsLive deployment logs
GET /api/v1/eventsServer-sent deployment status events

Errors

Error responses use an appropriate HTTP status and a JSON body containing an error field. Treat the message as operator-facing text rather than a stable machine-readable error code.