mistralM

Docs

sideBar

Beta Users

(beta) Users API.

GET /v1/users/me

Get Identity

Get Identity

Security

DashboardUserContextAuth
headerapiKey
BearerUserContextAuth
bearerhttp

Responses

OK

api_key
UserIdentityApiKey | null
UserIdentityApiKey
id
string* required
name
string | null* required
email
string | null* required
first_name
string | null* required
id
string* required
last_name
string | null* required
organization
UserIdentityOrganization | null
UserIdentityOrganization
id
string* required
name
string* required
workspace
UserIdentityWorkspace | null
UserIdentityWorkspace
id
string* required
name
string* required

GET /v1/users/me/organizations

List Organizations

List every organization the authenticated user is a member of.

Identity-only: the caller need not have selected an organization, so this reads only the user and never scopes by the active org.

Security

DashboardUserContextAuth
headerapiKey
BearerUserContextAuth
bearerhttp

Parameters

offset
integerquery

Number of organizations to skip before returning results.

limit
integerquery

Maximum number of organizations to return.

Responses

OK

organizations
array<UserOrganization>* required

The organizations the authenticated user is a member of.

UserOrganization
id
string* required

The organization's unique identifier.

Example:

1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d
name
string* required

The organization's display name.

Example:

Acme Corp

GET /v1/users/me/workspaces

List Workspaces

List every workspace the authenticated user is a member of, across all their organizations, each tagged with the organization it belongs to.

Security

DashboardUserContextAuth
headerapiKey
BearerUserContextAuth
bearerhttp

Parameters

organization_id
string | nullquery

Return only workspaces belonging to this organization.

offset
integerquery

Number of workspaces to skip before returning results.

limit
integerquery

Maximum number of workspaces to return.

Responses

OK

workspaces
array<UserWorkspace>* required

The workspaces the authenticated user is a member of, each tagged with the organization it belongs to.

UserWorkspace
id
string* required

The workspace's unique identifier.

Example:

7f8e9d0c-1b2a-4c3d-8e9f-0a1b2c3d4e5f
name
string* required

The workspace's display name.

Example:

production
organization_id
string* required

The identifier of the organization this workspace belongs to.

Example:

1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d

GET /v1/whoami

Whoami

Return the authenticated caller's identity.

Principal-agnostic: resolves both users and service accounts.

Security

DashboardUserOrServiceAccountContextAuth
headerapiKey
BearerUserContextAuth
bearerhttp

Responses

OK

customer_id
string | null

The billing customer identifier from the authenticated session. Identifies the billing account, not the organization (organization.id); the IDs are not interchangeable. Null when no customer is selected.

Examples:

3b241101-e2bb-4255-8caf-4136c566a962
null
organization
WhoamiOrganization | null

Organization identity and context for the authenticated caller.

WhoamiOrganization

Organization identity and context for the authenticated caller.

id
string* required

The organization's unique identifier.

Example:

1a2b3c4d-5e6f-4a8b-9c0d-1e2f3a4b5c6d
internal
boolean

Whether this is a Mistral-internal organization.

Examples:

false
true

Default Value: false

kind
string

The organization kind (e.g. 'S' standard, 'C' company internal, 'D' dogfooding).

Examples:

S
C

Default Value: "S"

name
string* required

The organization's display name.

Example:

Acme Corp
org_tier
string | null

The organization's billing tier (e.g. 'E' for Enterprise). Null when not set.

Examples:

E
null

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.

email
string | null

The user's email address, when known.

Example:

ada@example.com
first_name
string | null

The user's first name, when known.

Example:

Ada
id
string* required

The user's unique identifier.

Example:

8f14e45f-ceea-4e0a-9b0e-8f7d3c2a1b4e
last_name
string | null

The user's last name, when known.

Example:

Lovelace
principal_type
string

Discriminator identifying a human user principal.

Example:

user

Default Value: "user"

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.

name
string | null

The service account's display name, when known.

Example:

ci-deploy-bot
principal_type
string

Discriminator identifying a service-account principal.

Example:

service_account

Default Value: "service_account"

service_account_id
string* required

The service account's unique identifier.

Example:

3b241101-e2bb-4255-8caf-4136c566a962
workspace
UserIdentityWorkspace | null
UserIdentityWorkspace
id
string* required
name
string* required