Endpoint: Searching Users

Endpoint: Searching Users
February, 2025
POST /api/integration/rest/users/filter

This endpoint lets you search for users. You can apply pagination using the query parameters and apply filters using the request body.

Query ParametersExpected TypeDefault
mode"basic" | "detailed""basic"
limitnumber10
pagenumber1

Request Body:

{
  folder?: string[];
  group?: string[];
  labels?: string[];
  favorite?: boolean;
  type?: "teammate" | "regular";
  username?: string;
  active?: boolean;
}
  • username: The value to filter users by their usernames (case insensitive). The users whose usernames contain the filter value will be returned.
    • type: If a user's role is Manager, Operator, Editor, Question Bank Supervisor/Submitter or Special/Custom, they are considered a teammate. If their role is Test Taker, they are considered a regular user.
      • active: Whether a user is set as active. Inactive users cannot log in to their account.

        Response

        {
          users: (Basic | Detailed)[];
          pagination: {
              totalItems: number;
              totalPages: number;
              currentPage: number;
              limit: number;
              next: string | null;
              previous: string | null;
          }
        }

        The response will include only the users who satisfy all of the filters provided in the request body.

        The type of the users depends on the value of mode provided in the query parameters. If the value of mode is "basic", the user object in the response will be in this type:

        // "basic" user object:
        {
          userId: string;
          createdAt: number; // seconds
          username: string;
          fullname?: string; // might not exist in user
          email?: string; // might not exist in user
        }
        
        
        

        If the value of mode is "detailed", you will receive all of the properties from "basic" and also the following properties:

        // "detailed" user object:
        Basic & {
          organizationId: string;
          folder: string;
          tags: Record
          labels: string[];
          group: string;
          favorite: boolean;
          active: boolean;
          roles: "MANAGER" | "EDITOR" | "OPERATOR" | "USER" | "JOKER" | "QUESTIONBANKSUPERVISOR" | "QUESTIONBANKSUBMITTER"[];
        }
        Go Back
        Talk to a representative
        Figure out if TestInvite is a good match for your organization
        Book a demo