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

# Get my profile

> Returns the **Bearer-authenticated user's** own profile — their `id`,
`name`, and `email`. Identity only: it carries no company concept. To
discover the companies you can act on (and your default company), use
`GET /me/companies` — its `defaultCompanyId` is the default-company
pointer.

Unlike every other endpoint, this one is **not** company-scoped: it
**precedes** company selection. It is the MCP `whoami` lookup — the caller
uses it to confirm who they are logged in as.

**Authentication:** user-principal **Bearer** only. Send a user-scoped Auth0
access token as `Authorization: Bearer <jwt>`. An API key is **not** accepted
here (an API key is scoped to a single company and has no notion of "me"); a
request without a valid user Bearer token returns **401**.




## OpenAPI

````yaml /openapi/generated-external-api.yaml get /api/v1/me
openapi: 3.0.3
info:
  title: AI Insurance External API
  description: External API for AI Insurance platform
  version: 1.0.0
  contact:
    email: support@aiinsurance.io
servers:
  - url: https://go.aiinsurance.io
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/v1/me:
    get:
      tags:
        - User
      summary: Get my profile
      description: >
        Returns the **Bearer-authenticated user's** own profile — their `id`,

        `name`, and `email`. Identity only: it carries no company concept. To

        discover the companies you can act on (and your default company), use

        `GET /me/companies` — its `defaultCompanyId` is the default-company

        pointer.


        Unlike every other endpoint, this one is **not** company-scoped: it

        **precedes** company selection. It is the MCP `whoami` lookup — the
        caller

        uses it to confirm who they are logged in as.


        **Authentication:** user-principal **Bearer** only. Send a user-scoped
        Auth0

        access token as `Authorization: Bearer <jwt>`. An API key is **not**
        accepted

        here (an API key is scoped to a single company and has no notion of
        "me"); a

        request without a valid user Bearer token returns **401**.
      operationId: getMyProfile
      responses:
        '200':
          description: The user's profile.
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - name
                  - email
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The user's id in AI Insurance.
                  name:
                    type: string
                    description: The user's display name (empty string if unset).
                  email:
                    type: string
                    description: The user's email (empty string if unset).
              examples:
                profile:
                  summary: The caller's identity
                  value:
                    id: 33333333-3333-3333-3333-333333333333
                    name: Jane Doe
                    email: jane@example.com
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingApiKey:
              summary: Missing API key
              value:
                error:
                  code: AuthenticationError
                  message: API key authentication required
                  userMessages:
                    - API key authentication required
            invalidApiKey:
              summary: >-
                Invalid API key (e.g. unknown key, or a Bearer token used
                instead of an API key)
              value:
                error:
                  code: AuthenticationError
                  message: Invalid API key
                  userMessages:
                    - Invalid API key
    InternalServerError:
      description: Internal Server Error - Unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internalError:
              summary: Unexpected server error
              value:
                error:
                  code: UncaughtActionError
                  message: Uncaught error occurred in <actionName>
                  userMessages:
                    - An unexpected error occurred. Please try again later.
  schemas:
    ErrorResponse:
      type: object
      description: Standard error response for all external API endpoints
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human-readable error message
              example: 'submissionId: Required field is missing'
            userMessages:
              type: array
              description: >-
                Clean, verbatim-displayable messages — one entry per failure,
                free of error-code tags, field paths, and internal noise.
                Suitable for showing to end users as-is.
              items:
                type: string
              example:
                - Exposures of type 'company' require an address
            details:
              type: array
              description: Additional details for validation errors (field-level errors)
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: The field that caused the error
                    example: submissionId
                  message:
                    type: string
                    description: Description of the field error
                    example: Required field is missing
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Send your raw API key as the `Authorization`
        header value with NO scheme prefix — `Authorization: YOUR-API-KEY`. Do
        NOT prefix it with `Bearer ` or `ApiKey `, and do not use an `X-API-Key`
        header; those are not accepted.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        User-principal OAuth 2.0 Bearer authentication. Send a user-scoped Auth0
        access token (audience = the app API audience) as `Authorization: Bearer
        <jwt>`. The request resolves to the user's identity and is authorized by
        their Role on the `{companyId}` in the path — the same role-based
        permissions the web app enforces. This is the path the MCP connector
        uses to act on a user's behalf; endpoints that accept it list both
        `BearerAuth` and `ApiKeyAuth`.

````