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

# Get Users

> Retrieves all users with advanced filtering and page-based pagination.



## OpenAPI

````yaml api-reference/openapiFiles/users/Get/openapi.json get /users
openapi: 3.0.1
info:
  title: YJSG Institution APIs
  description: >-
    APIs for educational institutions to manage student accounts and track
    engagement.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.yourjobsearchgenius.ai/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /users:
    get:
      description: Retrieves all users with advanced filtering and page-based pagination.
      parameters:
        - name: page
          in: query
          description: 'Page number (default: 1)'
          schema:
            type: integer
            format: int32
            default: 1
        - name: limit
          in: query
          description: 'Number of records per page (default: 10)'
          schema:
            type: integer
            format: int32
            default: 10
        - name: email
          in: query
          description: Search by user email
          schema:
            type: string
        - name: userId
          in: query
          description: Search by user ID
          schema:
            type: string
        - name: uniqueUserId
          in: query
          description: Search by unique user ID
          schema:
            type: string
        - name: accountStatus
          in: query
          description: Filter by account status
          schema:
            type: string
            enum:
              - active
              - inactive
        - name: onboardingCompleted
          in: query
          description: Filter by onboarding completion status
          schema:
            type: boolean
        - name: lastLoginDateFrom
          in: query
          description: Filter by last login date range (ISO format)
          schema:
            type: string
            format: date-time
        - name: lastLoginDateTo
          in: query
          description: Filter by last login date range (ISO format)
          schema:
            type: string
            format: date-time
        - name: createdAtFrom
          in: query
          description: Filter by creation date range (ISO format)
          schema:
            type: string
            format: date-time
        - name: createdAtTo
          in: query
          description: Filter by creation date range (ISO format)
          schema:
            type: string
            format: date-time
        - name: lastLoginDaysAgo
          in: query
          description: Filter users who logged in X days ago
          schema:
            type: integer
            format: int32
        - name: hasNoContacts
          in: query
          description: Filter users with no contacts
          schema:
            type: boolean
        - name: hasNoDocuments
          in: query
          description: Filter users with no cover letters
          schema:
            type: boolean
        - name: hasNoResumes
          in: query
          description: Filter users with no resumes
          schema:
            type: boolean
        - name: hasNoJobTracking
          in: query
          description: Filter users with no tracked jobs
          schema:
            type: boolean
        - name: hasNoMockInterviews
          in: query
          description: Filter users with no mock interviews
          schema:
            type: boolean
        - name: hasNoInterviewResponses
          in: query
          description: Filter users with no interview responses
          schema:
            type: boolean
        - name: hasNoOfferNegotiations
          in: query
          description: Filter users with no offer negotiations
          schema:
            type: boolean
      responses:
        '200':
          description: Users response with pagination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsersResponse'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid Token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Invalid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error!
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UsersResponse:
      type: object
      properties:
        data:
          description: Array of user objects
          type: array
          items:
            $ref: '#/components/schemas/User'
        pagination:
          $ref: '#/components/schemas/Pagination'
        success:
          description: Indicates if the request was successful
          type: boolean
      required:
        - data
        - pagination
        - success
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
          format: s
    User:
      type: object
      properties:
        _id:
          description: ID of the user (MongoDB ObjectId)
          type: string
        firstName:
          description: The first name of the user.
          type: string
        lastName:
          description: The last name of the user.
          type: string
        email:
          description: Email address of the user.
          type: string
        uniqueUserId:
          description: Unique user ID assigned by the institution
          type: string
        accountStatus:
          description: Current status of the user account
          type: string
          enum:
            - active
            - inactive
        onboardingCompleted:
          description: Whether the user has completed onboarding
          type: boolean
        lastLoginDate:
          description: Date and time of the user's last login
          type: string
          format: date-time
        createdAt:
          description: Date and time when the user account was created
          type: string
          format: date-time
        autoLoginUrl:
          description: Auto login URL for the user
          type: string
          format: uri
    Pagination:
      type: object
      properties:
        totalCount:
          description: Total number of users
          type: integer
        totalPages:
          description: Total number of pages
          type: integer
        currentPage:
          description: Current page number
          type: integer
        limit:
          description: Number of records per page
          type: integer
        hasNextPage:
          description: Whether there is a next page
          type: boolean
        hasPrevPage:
          description: Whether there is a previous page
          type: boolean
        nextPage:
          description: Next page number
          type: integer
          nullable: true
        prevPage:
          description: Previous page number
          type: integer
          nullable: true
        nextUrl:
          description: URL for the next page
          type: string
          format: uri
          nullable: true
        prevUrl:
          description: URL for the previous page
          type: string
          format: uri
          nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````