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:

ScopeGrants
readRead-only access to every resource (all *:read).
deployEverything read grants, plus triggering deployments.
adminFull access — every scope.
apps:read / apps:writeRead / manage applications and their sub-resources.
servers:read / servers:writeRead / manage servers and SSH keys.
databases:read / databases:writeRead / manage databases and backups.
deploys:writeTrigger 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.