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

# Whoami

> Returns the identity and permissions of the current API key.

Validates the API key and returns the tenant identity, granted scopes, and
key metadata. Use this to verify your key works and see which scopes are
granted.

* Auth: `x-api-key` header (required)
* Rate limit: global only

Call `/v2/scopes` to see all available scopes (with tiers), then `/v2/whoami`
to see what your key has. The gap tells you what to request.

Common error responses:

* `401` when `x-api-key` header is missing or the key is invalid
* `403` when using a legacy static key (no tenant identity)

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.glider.fi/v2/whoami' \
    --header 'x-api-key: gldr_sk_your_api_key'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.glider.fi/v2/whoami", {
    headers: { "x-api-key": "gldr_sk_your_api_key" },
  });
  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "data": {
      "tenantName": "Integrator",
      "tenantEmail": "dev@integrator.example",
      "apiKeyId": "key_01JWZEE2MF30KVRMRX53N88VA4",
      "scopes": [
        "strategies:read",
        "strategies:write",
        "portfolios:read",
        "enroll:write"
      ]
    }
  }
  ```
</ResponseExample>
