Authentication
Every request authenticates with a personal access token (PAT) sent as a bearer token.
Authorization: Bearer hgp_your_token
Tokens are created in your account settings and shown only once. Requests with a missing, malformed, revoked, or expired token receive 401 Unauthorized. The public API is bearer-only — there is no cookie or session fallback.
Scopes
Each token carries scopes. Every endpoint documents the scope it requires. Macro scopes imply finer-grained ones:
| Scope | Grants |
|---|---|
read | Read-only access to every resource (all *:read). |
deploy | Everything read grants, plus triggering deployments. |
admin | Full access — every scope. |
apps:read / apps:write | Read / manage applications and their sub-resources. |
servers:read / servers:write | Read / manage servers and SSH keys. |
databases:read / databases:write | Read / manage databases and backups. |
deploys:write | Trigger deployments. |
A token lacking the required scope receives 403 Forbidden with code: "forbidden".
Tenancy
A token can only reach resources in accounts its owner belongs to. Cross-tenant ids return 404 Not Found (never 403) so the API never reveals which ids exist in other accounts.