GET /v1/auth/keys
List the caller's API keys (id, name, keyPrefix, scopes, createdAt, expiresAt, revokedAt). Optional ?workspaceId= to list keys scoped to a member workspace.
GET /v1/auth/keysList the caller's API keys (id, name, keyPrefix, scopes, createdAt, expiresAt, revokedAt). Optional ?workspaceId= to list keys scoped to a member workspace. Never returns hashes.
Required scope: brain:read
Query parameters
| Name | Required | Notes |
|---|---|---|
workspaceId | no | Optional: list keys for a workspace the caller is a member of (default = key's own workspace). |
Example
curl -X GET 'https://brain.unisonlabs.ai/v1/auth/keys' \
-H "Authorization: Bearer $UNISON_TOKEN"Returns the JSON described above on success, or an error envelope { "error": { "code", "message" } } on failure.
GET /v1/auth/workspaces
List all workspaces the caller is a member of, with their role and which is active.
POST /v1/auth/keys
Mint an additional usk_ key for the caller. Scopes must be a subset of the caller's scopes. brain:act-as requires owner/admin role. Optional body.workspaceId mints a key bound to a different member workspace.