Credentials
Use the smallest credential that fits the job. Privilege lives on the token grant, not on an /admin URL.

Cheat sheet

All of these go in the header as:
Token types on Hub are only user | realm. Legacy personal / daemon types are rejected.

API planes

There is no /admin route tree. The same resource paths serve everyone; the grant decides if the call is allowed. Interactive specs on this site: Hub API and Daemon API only.

Grants (domains + access)

Every user and realm token carries a grant:
  • Domainswhere the credential may act (orgs / scopes / realms).
  • Access — per entity, one or more of read | write | admin.
    • read — get / list (including run details and logs)
    • write — create / update / publish / dispatch / cancel / heartbeat
    • admin — irreversible tenancy ops (delete user/org, rotate org keys, …)
Dispatch is a write (usually runs:write or dispatch:write). Run events, logs, phases, and artifacts share the runs entity — they are not separate domains.

Mint templates

CI publisher
Realm enroll token
Platform / BFF (internal callers)

Session (people)

Headless:
Accounts are not created via a public signup API. Provisioning goes through CliqHub BFF → private Hub /internal routes. Day-to-day login stays on Hub API.

User token (automation)

Use that Bearer value on Hub API the same way you’d use a session JWT, limited by the grant. Rotate or revoke from the console (Account → Tokens) or Hub API → Tokens with type: "user".

Realm token (machines)

Mint on the realm page in Hub, or:
Daemons reject user JWTs and user tokens for enroll / heartbeat / job pickup. If register fails with 401, you’re almost certainly using the wrong token type — use a realm token (cliq_dt_…).

What each surface expects

  • Mental model → Concepts
  • CLI login / tokens → CLI
  • Path checklist for implementers → design/api-route-permissions.md in the repo