What API keys are for
API keys let scripts and external tools talk to the panel on your behalf without your password or 2FA code. The API currently lets you:
- Read your account details.
- List your services and check a service's status.
- Start, stop, restart or kill a service (for example from a cron job).
- List your invoices.
Creating a key
- Open your avatar menu and choose API Keys.
- Click Create API Key.
- Give the key a descriptive Name (e.g. "deploy-bot") so you can identify it later.
- Choose the Scopes the key should carry. Read-only scopes are selected by default; only add what the script actually needs.
- Click Create Key and copy the key immediately. It is shown once and never again.
Using a key
Send the key as a Bearer token on every request:
curl -H "Authorization: Bearer YOUR_KEY" \
https://unified.sableservers.com/api/v1/services
Available endpoints: GET /api/v1/account, GET /api/v1/scopes, GET /api/v1/services, GET /api/v1/services/{id}, POST /api/v1/services/{id}/power (with action set to start, stop, restart or kill), and GET /api/v1/billing/invoices.
Rotating and revoking
- If a key leaks, click Revoke on it immediately. Requests using it stop working right away.
- Rotate keys at least once a year: create a new one, update your scripts, then revoke the old one.
- If you no longer need a key (e.g. a project ended), revoke it.
Never commit API keys to a public Git repository. Use environment variables or a secret manager. If a key has been pushed publicly, revoke it before doing anything else; bots scan GitHub within minutes.