API Authentication
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer srvly_09475e0504e0695b22fc2decdd8e63db
The token is generated in the srvly dashboard under Settings → API Token.
Where to Find Your Token
- Open the srvly dashboard (console.srvly.app)
- Go to Settings
- Copy the token from the API Token section
Usage Examples
# List installations on a server
curl -H "Authorization: Bearer srvly_your_token" \
"https://console.srvly.app/api/agent/install?serverId=YOUR_SERVER_ID"
# List containers on a server
curl -H "Authorization: Bearer srvly_your_token" \
"https://console.srvly.app/api/agent/servers/YOUR_SERVER_ID/containers"
Public vs Authenticated Endpoints
| Endpoint | Auth Required |
|---|---|
GET /api/deploy | No (returns a public shell script) |
GET /api/agent/openapi.json | No (returns the API spec) |
| All other API endpoints | Yes (Bearer token) |
Token Security
- Treat your token like a password — never share it publicly or commit it to Git
- Tokens can be regenerated from Settings if compromised
- Each token is tied to your user account and grants full API access