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

# Fetch Employees by User ID

> Returns user details for the given list of user IDs.



## OpenAPI

````yaml /openapi.yaml post /v1/employees/filter
openapi: 3.1.0
info:
  title: Trackpilots API & Webhooks
  version: 1.1.0
  description: >
    Trackpilots REST APIs and Webhook events.

    Webhooks are sent by the Trackpilots desktop agent to customer-configured
    endpoints.

    Clients only send `secret_key`. All other fields are generated by the
    server.
servers:
  - url: https://api.trackpilots.com
    description: Production server
security: []
tags:
  - name: Teams
    description: Team management APIs
  - name: Desktop Events
    description: Desktop agent webhook events
paths:
  /v1/employees/filter:
    post:
      tags:
        - Manage Employees
      summary: Fetch Employees by User ID
      description: Returns user details for the given list of user IDs.
      operationId: filterUserByIds
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FilterUserIdsRequest'
      responses:
        '200':
          description: Fetched employee details successfully
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/200FetchFilteredEmployeeListSuccessResponse
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '422':
          description: Fetched employee details successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InvalidUserIdsError'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - BearerAuth: []
components:
  schemas:
    FilterUserIdsRequest:
      type: object
      required:
        - userId
      properties:
        userId:
          type: array
          minItems: 1
          items:
            type: string
            format: uuid
            example: f0ad9ad9-d421-48dc-868d-9760e33e5089
          description: List of user IDs to fetch
    200FetchFilteredEmployeeListSuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        statusCode:
          type: integer
          example: 200
        statusMessage:
          type: string
          example: Fetched employee details successfully
        error:
          type: object
          nullable: true
          example: null
        data:
          type: array
          items:
            type: object
            properties:
              userId:
                type: string
                format: uuid
                example: f0ad9ad9-d421-48dc-868d-9760e33e5089
              userName:
                type: string
                example: Abirami Kannan
              emailId:
                type: string
                format: email
                example: abiramikannan2006@gmail.com
              uniqueUrl:
                type: string
                example: 6Vx3kEA8VU0q
              profilePicUrl:
                type: string
                nullable: true
                example: null
              teamId:
                type: array
                items:
                  type: object
                  properties:
                    teamId:
                      type: string
                      format: uuid
                      example: 3d4c2ced-f4d6-42ea-b6db-7dcf24a77845
                    teamName:
                      type: string
                      example: Frontend Team
                example:
                  - teamId: c1e4416e-f57c-4614-886f-35a5541f4316
                    teamName: Full Stack Developer
                  - teamId: a2b5416e-f57c-4614-886f-35a5541f4321
                    teamName: Backend Team
                  - teamId: d9f4416e-f57c-4614-886f-35a5541f4399
                    teamName: UI/UX Team
              accountStatus:
                type: string
                enum:
                  - active
                  - invited
                example: active
              roleId:
                type: string
                format: uuid
                example: 271e6693-2130-4ea9-b02d-e6d57516186d
              roleName:
                type: string
                example: No Access
              workMode:
                type: string
                enum:
                  - office
                  - remote
                  - hybrid
                example: hybrid
    InvalidUserIdsError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: integer
          example: 422
        statusMessage:
          type: string
          example: Invalid userId
        error:
          type: object
          properties:
            message:
              type: string
              example: One or more userId do not exist for this organisation
            code:
              type: string
              enum:
                - INVALID_USER_ID
              example: INVALID_USER_ID
            details:
              type: object
              required:
                - invalidUserId
              properties:
                invalidUserId:
                  type: array
                  items:
                    type: string
                    format: uuid
                  example:
                    - f0ad9ad9-d421-48dc-868d-9760e33e5080
        data:
          nullable: true
          example: null
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: integer
          format: int32
          example: 401
        statusMessage:
          type: string
          example: Authentication failed
        data:
          nullable: true
          example: null
        error:
          type: object
          properties:
            message:
              type: string
              example: Authorization header is missing
            code:
              type: string
              enum:
                - AUTHORIZATION_HEADER_MISSING
                - INVALID_API_KEY_SCHEMA
                - API_KEY_MISSING
                - INVALID_API_KEY
                - PLAN_EXPIRED
              example: AUTHORIZATION_HEADER_MISSING
    InternalServerError:
      allOf:
        - $ref: '#/components/schemas/BaseError'
        - type: object
          properties:
            statusCode:
              example: 500
            statusMessage:
              example: Internal server error
            error:
              type: object
              properties:
                message:
                  example: Some technical error has occurred !!
                code:
                  example: UNKNOWN_SERVER_ERROR
    BaseError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: integer
        statusMessage:
          type: string
        data:
          nullable: true
          example: null
        error:
          type: object
          properties:
            message:
              type: string
            code:
              type: string
  responses:
    UnauthorizedError:
      description: Authentication & Authorization errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            authorizationHeaderMissing:
              summary: Authorization header missing
              value:
                success: false
                statusCode: 401
                statusMessage: Authentication token header is missing
                data: null
                error:
                  message: Authorization header is missing
                  code: AUTHORIZATION_HEADER_MISSING
            invalidAuthorizationScheme:
              summary: Invalid authorization scheme
              value:
                success: false
                statusCode: 401
                statusMessage: Invalid authentication token schema
                data: null
                error:
                  message: Authorization header must start with 'Bearer'
                  code: INVALID_API_KEY_SCHEMA
            apiKeyMissing:
              summary: API key missing
              value:
                success: false
                statusCode: 401
                statusMessage: Authentication token is missing
                data: null
                error:
                  message: API key value is missing
                  code: API_KEY_MISSING
            invalidApiKey:
              summary: Invalid or inactive API key
              value:
                success: false
                statusCode: 401
                statusMessage: Authentication failed
                data: null
                error:
                  message: Provided API key is invalid or inactive
                  code: INVALID_API_KEY
            planExpired:
              summary: Upgrade required
              value:
                success: false
                statusCode: 401
                statusMessage: Upgrade required
                data: null
                error:
                  message: Upgrade required to use Trackpilots APIs
                  code: PLAN_EXPIRED
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````