> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mesa.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# whoami()

> Return the caller identity for the current API key.

Fetch the authenticated key, scopes, and default organization.

**Required scope: `read`**

```ts theme={null}
const identity = await mesa.whoami();

console.log(identity.org.slug);
console.log(identity.scopes);
```

## Options

This method does not accept options.

## Response

<ResponseField name="org" type="OrgIdentity">
  Organization associated with the authenticated key.
</ResponseField>

<ResponseField name="key_id" type="string | null">
  Current API key ID, or null when unavailable.
</ResponseField>

<ResponseField name="key_name" type="string | null">
  Current API key name, or null when unavailable.
</ResponseField>

<ResponseField name="scopes" type="string[]">
  Scopes granted to the current key.
</ResponseField>

### OrgIdentity

<ResponseField name="id" type="string">
  Organization ID.
</ResponseField>

<ResponseField name="slug" type="string">
  Organization slug.
</ResponseField>

<ResponseField name="name" type="string">
  Organization display name.
</ResponseField>
