---
title: "Resolve the caller identity"
method: GET
path: "/v1/whoami"
tags: ["User management"]
---

# Resolve the caller identity

`GET /v1/whoami`

## Request

- Base URL: `https://api.clickhouse.cloud`
- URL: `https://api.clickhouse.cloud/v1/whoami`
- Auth: HTTP basic

**Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Returns the identity of the authenticated caller. For a user (JWT or clickhousectl token) the result carries the user fields; for an organization API key it carries the key fields instead. Use `actorType` to tell the two apart.

## Response `200`

Successful response

- object
  - `status` number: HTTP status code.
  - `requestId` string, uuid: Unique id assigned to every request. UUIDv4
  - `result` union
    - WhoamiUser
      - `actorType` 'user', required: Discriminator identifying the caller as a user (JWT or clickhousectl token).
      - `userId` string, uuid, required: Unique ID of the user.
      - `email` string, email, required: Email address of the user.
      - `name` string, required: Full name of the user.
      - `organizations` WhoamiOrganization[], required: Organizations the user belongs to.
        - `organizationId` string, uuid, required: ID of the organization the user belongs to.
        - `organizationName` string, required: Name of the organization.
    - WhoamiApiKey
      - `actorType` 'apiKey', required: Discriminator identifying the caller as an organization API key.
      - `keyId` string, required: Unique ID of the API key.
      - `name` string, required: Name of the API key.
      - `organizationId` string, uuid, required: ID of the organization that owns the API key.

## Other responses

- `400`: The request cannot be processed due to a client error. Please verify your request parameters and try again.
- `500`: An internal server error has occurred. If this issue persists, please contact ClickHouse Cloud support for assistance.

---

[API](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud.md) - [All operations](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/clickhouse/apis/openapi-spec-for-clickhouse-cloud/revisions/eac345053548?raw)
