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

# Community users list with summary stats

> Returns summary stats and a paginated list of users with community-computed stats.



## OpenAPI

````yaml /openapi/analytics.json get /community/users/list
openapi: 3.1.0
info:
  title: Nudj Analytics API
  version: 1.0.0
servers:
  - url: https://{subdomain}.nudj.cx/api/v2/analytics
    description: Organization API Server
    variables:
      subdomain:
        description: Your organization's subdomain (required)
        default: your-org
security: []
paths:
  /community/users/list:
    get:
      tags:
        - Community
      summary: Community users list with summary stats
      description: >-
        Returns summary stats and a paginated list of users with
        community-computed stats.
      operationId: getCommunityUsersList
      parameters:
        - in: query
          name: communityId
          schema:
            type: string
        - in: query
          name: skip
          schema:
            type: integer
            minimum: 0
            default: 0
          required: false
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          required: false
        - in: query
          name: search
          schema:
            type: string
        - in: query
          name: sortField
          description: >-
            Field to sort by. Supports base fields (createdAt, username, email,
            lastLoginAt, status, role, lastActivity) and computed stats
            (totalPoints, totalXP, totalAchievements, totalChallengesCompleted,
            totalRewards, currentStreak, longestStreak).
          schema:
            type: string
            enum:
              - createdAt
              - username
              - email
              - lastLoginAt
              - status
              - role
              - lastActivity
              - totalPoints
              - totalXP
              - totalAchievements
              - totalChallengesCompleted
              - totalRewards
              - currentStreak
              - longestStreak
            default: lastActivity
            description: >-
              Field to sort by. Supports base fields (createdAt, username,
              email, lastLoginAt, status, role, lastActivity) and computed stats
              (totalPoints, totalXP, totalAchievements,
              totalChallengesCompleted, totalRewards, currentStreak,
              longestStreak).
        - in: query
          name: sortDirection
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  summary:
                    type: object
                    properties:
                      totalUsers:
                        type: number
                      activeUsers:
                        type: number
                      averagePoints:
                        type: number
                      mostRecentUserDate:
                        type: string
                    required:
                      - totalUsers
                      - activeUsers
                      - averagePoints
                  data:
                    type: object
                    properties:
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            _id:
                              type: string
                            username:
                              type:
                                - string
                                - 'null'
                            email:
                              type:
                                - string
                                - 'null'
                            firstName:
                              type:
                                - string
                                - 'null'
                            lastName:
                              type:
                                - string
                                - 'null'
                            displayName:
                              type:
                                - string
                                - 'null'
                            bio:
                              type:
                                - string
                                - 'null'
                            phoneNumber:
                              type:
                                - string
                                - 'null'
                            createdAt:
                              type: string
                            updatedAt:
                              type: string
                            lastLoginAt:
                              type:
                                - string
                                - 'null'
                            emailVerified:
                              type:
                                - string
                                - 'null'
                            roles:
                              type: array
                              items:
                                type: string
                            role:
                              type:
                                - string
                                - 'null'
                            profilePicture:
                              type:
                                - string
                                - 'null'
                            profilePictureUrl:
                              type:
                                - string
                                - 'null'
                            stats:
                              type: object
                              properties:
                                totalPoints:
                                  type: number
                                totalXP:
                                  type: number
                                lastActivity:
                                  type:
                                    - string
                                    - 'null'
                                totalAchievements:
                                  type: number
                                totalChallengesCompleted:
                                  type: number
                                totalRewardsEarned:
                                  type: number
                                streakInfo:
                                  type: object
                                  properties:
                                    currentStreak:
                                      type: number
                                    longestStreak:
                                      type: number
                                  required:
                                    - currentStreak
                                    - longestStreak
                              required:
                                - totalPoints
                                - totalXP
                                - lastActivity
                                - totalAchievements
                                - totalChallengesCompleted
                                - totalRewardsEarned
                                - streakInfo
                          required:
                            - _id
                            - createdAt
                            - stats
                      pagination:
                        type: object
                        properties:
                          total:
                            type: number
                          skip:
                            type: number
                          limit:
                            type: number
                        required:
                          - total
                          - skip
                          - limit
                    required:
                      - data
                      - pagination
                required:
                  - summary
                  - data
        '400':
          description: Invalid input data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.BAD_REQUEST'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.NOT_FOUND'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error.INTERNAL_SERVER_ERROR'
components:
  schemas:
    error.BAD_REQUEST:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Invalid input data
        code:
          type: string
          description: The error code
          example: BAD_REQUEST
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: BAD_REQUEST
        message: Invalid input data
        issues: []
    error.NOT_FOUND:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Not found
        code:
          type: string
          description: The error code
          example: NOT_FOUND
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: NOT_FOUND
        message: Not found
        issues: []
    error.INTERNAL_SERVER_ERROR:
      type: object
      properties:
        message:
          type: string
          description: The error message
          example: Internal server error
        code:
          type: string
          description: The error code
          example: INTERNAL_SERVER_ERROR
        issues:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
            required:
              - message
          description: An array of issues that were responsible for the error
          example: []
      required:
        - message
        - code
      title: Error
      description: The error information
      example:
        code: INTERNAL_SERVER_ERROR
        message: Internal server error
        issues: []

````