---
title: "Whoami"
method: GET
path: "/v1/whoami"
tags: ["beta.users"]
---

# Whoami

`GET /v1/whoami`

## Request

- Base URL: `https://api.mistral.ai`
- URL: `https://api.mistral.ai/v1/whoami`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/mistral/apis/mistral-ai-api/docs/v1/whoami/get.ts> (a function with typed inputs; its response is checked against the schema)

Return the authenticated caller's identity.

Principal-agnostic: resolves both users and service accounts.

## Response `200`

OK

- WhoamiResponse: Principal-agnostic identity of the authenticated caller. Supersedes the user-centric ``/v1/users/me`` and ``/api/users/v2/me`` by resolving any principal (user or service account) through a single call. The ``principal`` field is a discriminated union; the remaining fields are the shared session context and apply to either principal kind.
  - `principal` union, required: The authenticated principal: either a user or a service account.
    - WhoamiUserPrincipal: Identity of a human user principal. Carries user-only fields. The ``principal_type`` discriminator makes this variant mutually exclusive with the service-account variant, so a payload can never carry both a user id and a service-account id.
      - `principal_type` 'user': Discriminator identifying a human user principal.
      - `id` string, required: The user's unique identifier.
      - `email` string, nullable: The user's email address, when known.
      - `first_name` string, nullable: The user's first name, when known.
      - `last_name` string, nullable: The user's last name, when known.
    - WhoamiServiceAccountPrincipal: Identity of a service-account principal. Carries service-account-only fields. Service accounts have no user profile (no email or name of a person); ``name`` is the service account's own display name. Resolved independently of the authentication mechanism.
      - `principal_type` 'service_account': Discriminator identifying a service-account principal.
      - `service_account_id` string, required: The service account's unique identifier.
      - `name` string, nullable: The service account's display name, when known.
  - `organization` WhoamiOrganization: Organization identity and context for the authenticated caller.
    - `id` string, required: The organization's unique identifier.
    - `name` string, required: The organization's display name.
    - `org_tier` string, nullable: The organization's billing tier (e.g. 'E' for Enterprise). Null when not set.
    - `internal` boolean: Whether this is a Mistral-internal organization.
    - `kind` string: The organization kind (e.g. 'S' standard, 'C' company internal, 'D' dogfooding).
  - `workspace` UserIdentityWorkspace
    - `id` string, required
    - `name` string, required

## Changes

- **2026-10-12** `6c349f3bdef6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/mistral/apis/mistral-ai-api/changes/v1/whoami/get.md)

---

[API](https://skmtc.dev/mistral/apis/mistral-ai-api.md) - [All operations](https://skmtc.dev/mistral/apis/mistral-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mistral/apis/mistral-ai-api/revisions/08a585fb75bc?raw)
