Auth
POST /v1/auth/request-key
Send a recovery OTP to a verified email (no auth required); the following /verify mints a new key.
POST /v1/auth/request-keySend a recovery OTP to a verified email (no auth required); the following /verify mints a new key.
Auth: none (public endpoint)
Body fields
| Name | Required | Notes |
|---|---|---|
email | yes |
Example
curl -X POST 'https://brain.unisonlabs.ai/v1/auth/request-key' \
-H "Authorization: Bearer $UNISON_TOKEN" \
-H 'content-type: application/json' \
-d '{"email": "..."}'Returns the JSON described above on success, or an error envelope { "error": { "code", "message" } } on failure.
POST /v1/auth/verify
Submit the emailed OTP code (no auth required). First-time: makes workspace durable. Repeat: key recovery (returns new apiKey).
GET /v1/auth/whoami
Return the authenticated user, workspace, and scopes for the presented key. When delegated (X-Unison-Actor), includes actedAs: { externalId, userId }.