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.

unison-brain
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.

Required scope: brain:read

Body fields

NameRequiredNotes
nameno
scopesnoSubset of caller's scopes; brain:act-as only for owner/admin.
workspaceIdnoOptional: 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.