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

# Auth Whoami V1

> Echo the calling key's effective auth context. Useful for SDK debugging — 'what scopes do I have, what tenant am I bound to?' Doesn't hit the database…

Echo the calling key's effective auth context.

Useful for SDK debugging — 'what scopes do I have, what tenant am I
bound to?' Doesn't hit the database; returns whatever
`get_api_key_tenant` resolved at request time. Reaching this endpoint
successfully proves the key is active, unexpired, and within rate
limit (the auth dependency would have rejected otherwise).

### Response

`WhoamiResponse`

<ResponseField name="tenant_id" type="string" required />

<ResponseField name="api_key_id" type="string" required />

<ResponseField name="user_id" type="string" required />

<ResponseField name="scopes" type="string[]" required />

<ResponseField name="is_admin" type="boolean" required>
  Convenience flag: true iff `admin` is in the key's scope set. Admin keys can manage other keys, webhooks, and templates.
</ResponseField>

### Status codes

| Code  | Meaning             |
| ----- | ------------------- |
| `200` | Successful Response |

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.computer.stateset.app/api/v1/auth/whoami' \
    --header 'X-API-Key: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "tenant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "api_key_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "scopes": [
      "string"
    ],
    "is_admin": true
  }
  ```
</ResponseExample>
