API
Authentication
API tokens, scopes and rotation.
The StackHeal REST API authenticates with bearer tokens. A token is bound to a tenant scope and a role, so an API caller has exactly the permissions a user with that role would have — no more.
Scopes
Tokens carry scopes that map to the role model: triggering runs, reading run history, managing workflow definitions, and administrative operations. Issue the narrowest scope the integration needs; a system that only triggers runs should not hold a token that can edit definitions.
curl https://api.stackheal.example/v1/runs \
-H "Authorization: Bearer $STACKHEAL_TOKEN" \
-H "Content-Type: application/json"Keep tokens server-side
Rotation
Tokens can be rotated with an overlap period so a caller can move to a new token before the old one is revoked. Revocation takes effect immediately.
Scope of this documentation