Skip to content
Developer docs
Docs menu

Identity

Markdown

Who the calling key is and what it can do.

Read the current identity

GET/v2/whoami

The authenticated principal, the key in use, and the effective capabilities. Needs no capability, so a key that lost all of them can still see what it has left.

Capability No capability is checked.

Guide: Authentication and API keys

Responses

Error statuses

400 401 403 404 422 429 500 503 See Errors for the error shape and Error codes for what each code means.

Example request

curl
curl "https://api.mirabase.dev/v2/whoami" \
  -H "Authorization: Bearer $MIRABASE_API_KEY"

Example response

json
{
  "tenant_id": "<tenant_id>",
  "principal": {
    "id": "<id>",
    "kind": "human",
    "roles": [
      "<roles>"
    ],
    "capabilities": [
      "knowledge:read"
    ],
    "created_at": "2026-11-06T00:00:00Z"
  },
  "effective_capabilities": [
    "knowledge:read"
  ]
}