Authentication
Create an API token and choose its permissions.
Send one API token in the Authorization header:
Authorization: Bearer stz_YOUR_TOKEN_SECRETSecrets start with stz_, so secret scanners can spot a leaked one. Stazus shows the secret once and can't recover it. If you lose it, roll the token: it gets a new secret with the same name and permissions, and the old secret stops working at once.
Permissions
Each token holds a list of specific permissions, such as checks.read, checks.pause or incidents.close. Every API route needs exactly one of them. The token form lists them all, grouped by part of the app, and adds anything a permission depends on: checks.update also gives checks.read and checks.pause.
Start from a template to save picking them one by one:
| Template | Selects |
|---|---|
| Read only | Every read permission |
| MCP: read only | mcp.connect plus every read permission |
| MCP: full access | mcp.connect plus every permission a token can hold |
| Full API access | Every permission a token can hold, except mcp.connect |
| Incident management | Every incident permission, plus reading statuses, checks and projects |
| CI/CD deploys | Reading and pausing checks, reading projects, and maintenance windows |
| Monitoring as code | Every project, check and maintenance permission, including deletes |
| Status reporting | Reading projects, checks, analytics, incidents and usage |
Editors can also save their own templates for the team. A template only fills in the form: changing a template later never changes tokens already made from it.
Some actions only work when you're signed in to Stazus, never with a token: creating, editing or rolling tokens, deleting or leaving the team, and changing your contact methods.
What a token can do right now
A token belongs to one user and one team, and can never do more than that user can do now. Stazus checks this on every request, so changes apply to the very next one:
- An expired, revoked or rolled-away secret gets
401 invalid_token. - A token whose owner's account is deactivated gets
403 inactive_owner. - A route whose permission isn't on the token gets
403 missing_permission, naming the permission. - A permission the owner's role no longer holds gets
403 role_insufficient. Demoting someone to viewer narrows their tokens at once; promoting them back restores them. - Removing someone from the team deletes their tokens for that team.
To see what a token can do, call GET /api/public/v3/token. It needs no permission and returns the token's team, owner, stored permissions and effective_permissions (what it can do right now):
curl -H "Authorization: Bearer $STAZUS_API_TOKEN" \
"https://backendv2-production.stazus.com/api/public/v3/token"Store tokens safely
- Store tokens in a secret manager or protected environment variable.
- Don't put tokens in source code or browser code.
- Give each integration its own token, with only the permissions it needs.
- Choose the shortest expiry that works. Tokens last at most a year; roll them before they expire.
- Editors can see every member's tokens on the API page and revoke one that leaks.
Last updated on