Create Key
Mint a personal access token and return its plaintext once.
The plaintext is not stored, so this response is the only opportunity to capture it. A caller who loses it must revoke the key and mint another.
Raises: HTTPException 400: If the requested scopes are not recognised. HTTPException 409: If the caller already holds the maximum active keys.
Authorizations
A personal access token (haico_pat_...), created under Profile → API keys. Send it as Authorization: Bearer <key>. The browser session JWT is also accepted but is an internal mechanism and is not part of the public contract.
Body
Request to mint a new personal access token.
Label to recognise this key by, e.g. 'analysis laptop'
1 - 100'read' for safe methods only, 'read,write' for full access
read, read,write Lifetime in days. Omit for the default (90); 0 never expires.
0 <= x <= 3650Response
Successful Response
Response to key creation: the only time the plaintext is ever returned.
It is not stored anywhere, so a caller who loses it must revoke the key and mint another.