REST API

Manage your services, monitors and more from scripts and CI with API keys.

API keys

Create keys under Settings → Developers → API keys. The full key (ws_live_…) is shown exactly once; we store only its SHA-256 hash. Keys have scopes:

  • read — list and inspect everything (default).
  • write — also allows actions: power actions, redeploys, monitor changes.

You can have up to 10 active keys; revoke any of them any time. Requests are limited to 120 per minute per key.

Calling the API

Send the key as a bearer token:

curl -H "Authorization: Bearer ws_live_YOUR_KEY" https://weserver.host/api/v1/me

Errors come back as {"error":{"code":"...","message":"..."}} with a fitting HTTP status. All endpoints return only your own resources.

Endpoints

Method Path Description
GET /api/v1/me Your email and wallet balance
GET /api/v1/services List your services
GET /api/v1/services/:id Status, health, domains, package, allocation
POST /api/v1/services/:id/redeploy Redeploy a GitHub app (write)
POST /api/v1/services/:id/restart Restart (write)
POST /api/v1/services/:id/stop Stop (write)
POST /api/v1/services/:id/start Start (write)
GET /api/v1/services/:id/deployments Deployment history
GET /api/v1/services/:id/logs?lines=100 Container logs (max 500 lines)
GET /api/v1/monitors List your monitors
POST /api/v1/monitors Create a monitor (write)
GET /api/v1/monitors/:id One monitor with uptime stats
PATCH /api/v1/monitors/:id Edit a monitor (write)
DELETE /api/v1/monitors/:id Delete a monitor (write)
GET /api/v1/status-pages Your status pages
GET /api/v1/invoices Your invoices
GET /api/v1/packages Available resource packages

Examples

Restart a service:

curl -X POST -H "Authorization: Bearer ws_live_YOUR_KEY" https://weserver.host/api/v1/services/SERVICE_ID/restart

Create a monitor that checks https://example.com every minute:

curl -X POST https://weserver.host/api/v1/monitors \
  -H "Authorization: Bearer ws_live_YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"Marketing site","type":"HTTP","target":"https://example.com","intervalSec":60,"enabled":true}'

Power actions reuse the panel's guards: suspended services cannot be started, and redeploys only apply to GitHub apps.