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

# Get the authenticated user

> Returns the authenticated user and assigned access context. Requires `hmis:read`.



## OpenAPI

````yaml /openapi.yaml get /me
openapi: 3.1.0
info:
  title: HMIS API
  version: 1.0.0
  description: >-
    Versioned API for HMIS foundation resources and laboratory/radiology
    integrations. All operations use Laravel Sanctum bearer tokens with a
    dedicated ability per operation.
servers:
  - url: https://jaliprohmis.derrickmugabwa.dev/api/v1
    description: HMIS staging API
security:
  - bearerAuth: []
tags:
  - name: Foundation
    description: Authenticated HMIS context and reference data.
  - name: Laboratory integration
    description: Analyzer worklists and result ingestion.
  - name: Radiology integration
    description: PACS worklists and study ingestion.
paths:
  /me:
    get:
      tags:
        - Foundation
      summary: Get the authenticated user
      description: >-
        Returns the authenticated user and assigned access context. Requires
        `hmis:read`.
      operationId: getCurrentUser
      responses:
        '200':
          description: Authenticated user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserResponse'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    UserResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/User'
    User:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        email:
          type: string
          format: email
        user_type:
          $ref: '#/components/schemas/UserType'
        can_access_clinical_processes:
          type: boolean
        branches:
          type: array
          items:
            $ref: '#/components/schemas/Branch'
        departments:
          type: array
          items:
            $ref: '#/components/schemas/DepartmentAssignment'
        clinics:
          type: array
          items:
            $ref: '#/components/schemas/Clinic'
    ErrorResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: Unauthenticated.
      additionalProperties: true
    UserType:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        code:
          type: string
        can_access_clinical_processes:
          type: boolean
    Branch:
      type: object
      properties:
        id:
          type: integer
        organization_id:
          type: integer
        name:
          type: string
        code:
          type: string
        email:
          type:
            - string
            - 'null'
          format: email
        phone:
          type:
            - string
            - 'null'
        address:
          type:
            - string
            - 'null'
        is_active:
          type: boolean
        is_primary:
          type: boolean
    DepartmentAssignment:
      type: object
      properties:
        id:
          type: integer
        branch_id:
          type: integer
        name:
          type: string
        code:
          type: string
        is_primary:
          type: boolean
    Clinic:
      type: object
      properties:
        id:
          type: integer
        branch_id:
          type: integer
        department_id:
          type: integer
        name:
          type: string
        code:
          type: string
        supports_outpatient:
          type: boolean
        supports_inpatient:
          type: boolean
        is_active:
          type: boolean
        is_primary:
          type: boolean
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: Bearer token is valid but lacks the required ability.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum personal access token
      description: >-
        Paste a Sanctum personal access token generated by a HMIS super
        administrator. Use only a token with the ability required by the
        selected operation.

````