Skip to main content
POST
Create Key

Authorizations

Authorization
string
header
required

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

application/json

Request to mint a new personal access token.

name
string
required

Label to recognise this key by, e.g. 'analysis laptop'

Required string length: 1 - 100
scopes
enum<string>
default:read,write

'read' for safe methods only, 'read,write' for full access

Available options:
read,
read,write
expires_in_days
integer | null

Lifetime in days. Omit for the default (90); 0 never expires.

Required range: 0 <= x <= 3650

Response

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.

key
ApiKeySchema · object
required

A key's non-secret metadata. The plaintext is never included here.

plaintext
string
required

The full key. Shown once and never retrievable again.