Auth
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.
POST /v1/auth/keysMint 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.
Required scope: brain:read
Body fields
| Name | Required | Notes |
|---|---|---|
name | no | |
scopes | no | Subset of caller's scopes; brain:act-as only for owner/admin. |
workspaceId | no | Optional: bind the new key to a workspace the caller is a member of. |
Example
curl -X POST 'https://brain.unisonlabs.ai/v1/auth/keys' \
-H "Authorization: Bearer $UNISON_TOKEN" \
-H 'content-type: application/json' \
-d '{"name": "...", "scopes": "...", "workspaceId": "..."}'Returns the JSON described above on success, or an error envelope { "error": { "code", "message" } } on failure.