Creating a workspace key needs the Create API keys permission (Editor and Admin by default) and a plan that includes API keys; otherwise the response is 403, or 402 with code FEATURE_NOT_AVAILABLE.
Keys are created, regenerated and deleted only in the web app. A key cannot manage keys.
A key is sk- followed by 43 URL-safe characters. The web app shows its first 5 and last 4 characters afterwards.
The full key is shown once, when it is created or regenerated. Store it in an environment variable or a secrets manager; never commit or print it.
An optional expiration date can be set when the key is created or regenerated.
Regenerating issues a new value; the old value stops working immediately.
Keys carry scopes. The Alomana API needs the central-hub scope (labelled Agents in the web app). Keys created in the web app get central-hub, alo-files and aloflow by default.
Lab routes (/api/v1/diagnostics/) also need the lab scope (labelled Lab). It is not a default and works only together with Agents; see Lab.
Scopes are chosen when the key is created. To add one, create a new key.
A workspace key in its own workspace, a platform key, or a bearer token
Platform key or bearer
A platform key or a bearer token; a workspace key gets 403
Bearer only
A signed-in user's bearer token; an API key gets 401 {"detail": "Not authenticated"}, or 403 on Alo Files
Only a signed-in user can: use chats (a key with the lab scope reads an agent's chats with GET /api/v1/diagnostics/agents/{id}/chats/ and .../chats/{chat_id}/); list or delete a chat's sandbox files; run a scheduled task now; start a new OAuth connection or install Slack; open a shared chat link; approve or reject a certification; manage workflows; use /organizations/current/; create their first workspace; accept an invite; change their profile or password; buy a plan or read billing details.