Authentication
Create a v2 API key
In the app, open Settings, then API Access, and create a key or edit an existing one.
- Turn on Allow this key to use API v2.
- Choose the key’s permissions, for example
cards:readorcards:write. Each operation in the reference needs specific permissions; a call outside them returnsPERMISSION_DENIED. - Choose the role.
ReadOnlykeys can hold read permissions only. - Optionally restrict the key to specific IPs or CIDR ranges.
The secret is shown once, so store it immediately. Keep it on a trusted server and never ship it in a browser or mobile app.
A key created with v2 access works only with v2. An existing v1 key that you enable for v2 keeps its v1 access, which its v2 permissions do not limit. Changing a key’s permissions, role or IP allowlist ends its current access tokens.
Get an access token
Send the API key as a bearer credential to POST /access-token. This is the only operation that accepts the API key.
expiresIn is in seconds and expiresAt is in Unix epoch milliseconds. The request takes no body; send none or {}.
Use the token
Send the token on every other operation:
To refresh, exchange the API key again before expiresAt. An access token never creates another access token. Never log a token or put it in a URL.
A platform key also names the account holder it acts on:
Authentication errors
A 401 response carries WWW-Authenticate: Bearer, with error="invalid_token" when a credential was sent and refused.