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

# Get Current User

> Return profile information for the authenticated user.

Returns the authenticated user's profile in a single call: their identity, organisation context, team assignment, and the feature modules enabled for their organisation. Useful for initialising application state after authentication without needing to stitch together multiple requests.

## Best Practices

1. **Session initialisation**: Call this endpoint immediately after authentication to hydrate your application with user and org context.
2. **Feature gating**: Use `enabled_feature_modules` to conditionally show or hide features in your integration before making downstream API calls.
3. **Early access**: Check `organisation.early_access` to determine whether the organisation has access to preview features.
4. **Team context**: The `team` field is the user's currently assigned team within the organisation, or `null` if the user has not been assigned to one. Use it to scope team-specific UI and actions.
5. **Caching**: The response is cheap to fetch but safe to cache for the duration of a session. Invalidate on logout or org changes.


## OpenAPI

````yaml GET /users/me
openapi: 3.1.0
info:
  title: Veridox Core API
  description: Veridox Core Platform API
  version: 0.0.1
  contact: {}
servers:
  - url: https://api.uk.veridox.ai
    description: Live (UK)
  - url: https://api.ca.veridox.ai
    description: Live (CA)
security: []
tags:
  - name: Status
    description: System status and health check endpoints
  - name: Cases
    description: Case and case file management
  - name: Organisations
    description: Organisation management
  - name: Document Requests
    description: Document request management
  - name: Search
    description: Search functionality
  - name: Admin
    description: Administrative endpoints
paths:
  /users/me:
    get:
      tags:
        - Users
      summary: Get current user profile
      description: >-
        Returns the authenticated user's profile including their organisation
        context, enabled feature modules, and marketing-email consent
        preference.
      operationId: UsersController_getMe
      parameters: []
      responses:
        '200':
          description: User profile retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeResponseDto'
        '401':
          description: Unauthorized (invalid or missing authentication token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '404':
          description: request.users.user.not-found (user record not found)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
        '429':
          description: Too many requests (rate limit exceeded)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    MeResponseDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
          x-nestjs_zod-uses-3-point-1-syntax: true
        name:
          type: string
          x-nestjs_zod-uses-3-point-1-syntax: true
        email:
          type: string
          x-nestjs_zod-uses-3-point-1-syntax: true
        marketing_consent:
          type: boolean
          x-nestjs_zod-uses-3-point-1-syntax: true
        organisation:
          type: object
          properties:
            id:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
            name:
              type: string
            role:
              type: string
              enum:
                - organisation_owner
                - member
            early_access:
              type: boolean
          required:
            - id
            - name
            - role
            - early_access
          x-nestjs_zod-uses-3-point-1-syntax: true
          x-nestjs_zod-self-required: true
        enabled_feature_modules:
          type: array
          items:
            type: string
          x-nestjs_zod-uses-3-point-1-syntax: true
        team:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-7[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
                name:
                  type: string
              required:
                - id
                - name
            - type: 'null'
          x-nestjs_zod-uses-3-point-1-syntax: true
          x-nestjs_zod-empty-type: true
      required:
        - id
        - name
        - email
        - marketing_consent
        - organisation
        - enabled_feature_modules
        - team
    ErrorDto:
      type: object
      properties:
        error_code:
          type: string
          description: Machine-readable error code for programmatic handling
          examples:
            - request.cases.file.missing-risk-score
            - request.authentication.invalid-token
            - request.forbidden
            - request.cases.case.not-found
            - request.cases.case.already-locked
        error_message:
          type: string
          description: Human-readable error message explaining what went wrong
          example: >-
            User tried to perform an invalid operation on a file without a risk
            score.
        error_details:
          type: object
          example:
            field: email_address
      required:
        - error_code
        - error_message

````