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

# Latest active users

> Retrieves a list of the most recently active users based on assistant interactions.



## OpenAPI

````yaml api-reference/openapi.json get /latest_active_users
openapi: 3.0.0
info:
  title: Cati Main Server API
  version: 1.0.0
  description: >-
    API for managing Cati assistant users, app users, contacts, media,
    notifications and preferences.
servers:
  - url: /
security: []
paths:
  /latest_active_users:
    get:
      tags:
        - Users
      summary: Get the latest active users
      description: >-
        Retrieves a list of the most recently active users based on assistant
        interactions.
      parameters:
        - name: limit
          in: query
          description: 'Maximum number of active users to return (default: 5).'
          required: false
          schema:
            type: integer
            default: 5
      responses:
        '200':
          description: List of latest active users with their last active timestamp.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LatestActiveUser'
        '500':
          description: Database or server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    LatestActiveUser:
      type: object
      properties:
        user_id:
          type: integer
          description: User ID
        last_active:
          type: string
          format: date-time
          description: Last active timestamp
      required:
        - user_id
        - last_active
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Database connection failed

````