Skip to content

Who Am I

GET
/v1/whoami
curl --request GET \
--url https://example.com/v1/whoami \
--header 'X-API-Key: <X-API-Key>'

The account and workspace this request acts in, the person it acts as and their role in that workspace, and the API key it used.

Without X-Qualia-Workspace the workspace is the key’s own (for a signed-in user, the account’s default). Any valid key may ask; no scope is needed. An SDK client with a key and no configured account uses this account_id.

The bound account, workspace and key

Media type application/json
WhoamiResponse

The caller, as this request was bound.

object
account_id
required

The bound account

string | null
account_name

The account’s name

string | null
account_type

Personal or organization (the platform’s account type)

string | null
workspace_id
required

The bound workspace

string | null
workspace_name

The workspace’s name

string | null
user_id

The person it acts as: for an API key, its creator

string | null
username

That person’s username

string | null
role

That person’s role in the bound workspace (an API key’s scopes cap what it may do with it); null when it could not be read

string
nullable
Allowed values: viewer contributor admin owner
principal
required
string
Allowed values: api_key user
key

The API key, or null for a signed-in user

object
name

The key’s name

string | null
key_prefix

The key’s first 12 characters, as the dashboard lists it

string | null
scope
required

Organization: every workspace of the account its creator can reach; workspace: only the workspace that owns it; restricted: a custom workspace or repository allowlist

string
Allowed values: organization workspace restricted
scopes

Granted permissions

Array<string>
allowed_project_ids

Workspaces the key is restricted to; empty means no restriction

Array<string>
expires_at

Expiry, ISO 8601

string | null
Example
{
"role": "viewer",
"principal": "api_key",
"key": {
"scope": "organization"
}
}

Invalid or missing API key

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}

The named workspace is not readable

Media type application/json
ErrorResponse

Standard error response.

object
detail
required

Error message describing what went wrong

string
Example generated
{
"detail": "example"
}