Skip to main content
Programmatic clients authenticate with a personal access token: a long-lived credential you create once from your account and then hold in a script, a server, or a CI secret.
POST /api/auth/register and POST /api/auth/login are browser-only flows and cannot be called from a script. Both verify a reCAPTCHA v3 token, and reCAPTCHA v3 tokens are minted by Google’s JavaScript inside a real browser, are bound to an action, and expire within minutes. No HTTP client can produce one. Registration also requires you to click an emailed verification link before your first login. Create your account in the browser, once, then use a token thereafter. The reasoning is recorded in ADR-0006.

Creating a token

1

Create a token

Sign in at haico.gr, open Profile → API keys, and choose New key.Pick a name you will recognise later, an access level, and an expiry:The default expiry is 90 days. You can also choose 30 days, 1 year, or no expiry.
2

Copy it immediately

The token is displayed once. Only a SHA-256 hash of it is stored, so it genuinely cannot be shown again. If you lose it, revoke the key and create another.
Store it the way you would any other secret: an environment variable, a secrets manager, or your CI provider’s encrypted variables. Never commit it. The fixed haico_pat_ prefix exists so that GitHub secret scanning and push protection can recognise a leaked key.
3

Send it on every request

Managing your tokens

The same operations are available over HTTP, but only with a browser session token, never with a personal access token. If a token could mint tokens, a single leaked credential could issue replacements, outlive its own revocation, and turn a read-only grant into a writable one. Revocation is instant and independent: disabling one token has no effect on your other tokens or on your browser session.

Limits and error responses

Rate limiting is applied per token, not per IP address, so a CI host running several legitimate tokens is not throttled as though it were one client.
The browser session JWT also authenticates every route, but it is an internal mechanism and not part of the public contract. It cannot be obtained without a browser, it expires every 24 hours, and it cannot be revoked individually. Do not build against it.

Security notes

  • Treat a token like a password. It carries your full account authority within its scope.
  • Prefer read when that is enough. A read-only token cannot start an agent turn or modify the workspace, which bounds the damage if it leaks.
  • Set an expiry. A forgotten token that never expires is a permanent liability.
  • Revoke rather than rotate secrets. Revoking one token is instant and affects nothing else.
  • Never put a token in browser code. Tokens are for confidential clients: servers, scripts, and CI. A browser cannot keep a secret, and anything in localStorage is reachable by any XSS.

Check a token from CI

A ready-made shell snippet that fails your pipeline early on an expired token.