v2

latestOpenAPI 3.1.02026-08-07139158192.4 KB
Account

The current principal and the org it acts in

Returns the calling principal (API key or user session) and the organization the request acts in. For an API key that org is fixed by the key; for a session it is the active org, and availableOrgs lists every org the user belongs to. Unlike /v1/me this works for API keys and does not onboard.

get/v1/whoami

Response

The caller's principal + acting org

emailstring

Set for a user session.

organizationIdstring required

The org this request acts in (fixed for a key, the active org for a session; may be empty for a session mid-onboarding).

organizationNamestring
principalType'api_key' | 'user' required

Whether the caller authenticated with an API key or a user session.

rolestring

The user's role in the acting org (session only).

scopesstring[]

The API key's scopes (key principal only).

userIdstring

Set for a user session.