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

# Whoami

> Return the authenticated console principal.

Smoke-test endpoint for console auth. Returns the principal kind
plus its identifying fields so callers can confirm their token was
verified against the console Clerk realm rather than the customer
realm.

Args:
    principal: Authenticated console principal resolved from the
        bearer token.

Returns:
    A dictionary with ``kind`` set to ``console_user`` or
    ``console_machine`` and the identifying fields for that kind.
    Fields not applicable to the resolved kind are present with
    a ``None`` value so the response shape is stable.



## OpenAPI

````yaml https://api.pragmatiks.io/openapi.json get /console/whoami
openapi: 3.1.0
info:
  title: Pragma API
  version: 0.1.0
servers: []
security: []
paths:
  /console/whoami:
    get:
      tags:
        - console
      summary: Whoami
      description: |-
        Return the authenticated console principal.

        Smoke-test endpoint for console auth. Returns the principal kind
        plus its identifying fields so callers can confirm their token was
        verified against the console Clerk realm rather than the customer
        realm.

        Args:
            principal: Authenticated console principal resolved from the
                bearer token.

        Returns:
            A dictionary with ``kind`` set to ``console_user`` or
            ``console_machine`` and the identifying fields for that kind.
            Fields not applicable to the resolved kind are present with
            a ``None`` value so the response shape is stable.
      operationId: console-whoami
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                additionalProperties:
                  anyOf:
                    - type: string
                    - type: 'null'
                type: object
                title: Response Console-Whoami

````