# Retrieve all users with optional filters and pagination Endpoint: GET /users Version: 1.0 Security: bearer ## Query parameters: - `search` (string) Search across firstName, lastName, and email Example: "john" - `role` (array) Filter by user role(s) Enum: "ADMIN", "ORGANIZATION_USER", "BRAND_USER", "SITE_USER", "CLIENT_ACCOUNT_USER", "SITE_MANAGER_USER" - `isEnabled` (boolean, required) Filter by enabled status Example: true - `clientAccountId` (array) Filter by client account IDs Example: [1,2] - `organizationId` (array) Filter by organization IDs Example: [1,2] - `brandId` (array) Filter by brand IDs Example: [1,2] - `siteId` (array) Filter by site IDs Example: [1,2] - `page` (number) Page number (0-based) - `pageSize` (number) Number of items per page Example: 10 - `field` (string) Field to sort by Enum: "id", "firstName", "lastName", "email", "role", "isEnabled", "createdAt", "updatedAt" - `sortBy[0][field]` (string) First sort field Enum: "id", "firstName", "lastName", "email", "role", "isEnabled", "createdAt", "updatedAt" - `sortBy[0][dir]` (string) First sort direction Enum: "asc", "desc" - `sortBy[1][field]` (string) Second sort field Enum: "id", "firstName", "lastName", "email", "role", "isEnabled", "createdAt", "updatedAt" - `sortBy[1][dir]` (string) Second sort direction Enum: "asc", "desc" ## Response 200 fields (application/json): - `data` (array, required) Array of users - `data.id` (number, required) Unique identifier for the user Example: 1 - `data.email` (string, required) Email address of the user Example: "admin@admin.com" - `data.firstName` (string, required) First name of the user Example: "John" - `data.lastName` (string, required) Last name of the user Example: "Doe" - `data.role` (string, required) Role of the user Enum: "ADMIN", "ORGANIZATION_USER", "BRAND_USER", "SITE_USER", "CLIENT_ACCOUNT_USER", "SITE_MANAGER_USER" - `data.isEnabled` (boolean, required) Is the user enabled Example: true - `data.createdAt` (string, required) Creation date of the user Example: "2024-01-01T00:00:00.000Z" - `data.updatedAt` (string, required) Last update date of the user Example: "2024-01-02T00:00:00.000Z" - `data.userOrganizations` (array) Organizations associated with the user - `data.userBrands` (array) Brands associated with the user - `data.userSites` (array) Sites associated with the user - `data.userClientAccounts` (array) Client accounts associated with the user - `data.clientAccountSiteManagers` (array) Client account site management permissions - `data.tosAcceptedAt` (string, required) Time stamp of the Terms of Services acceptance Example: "2024-01-02T00:00:00.000Z" - `meta` (object, required) Pagination metadata - `meta.page` (number, required) Current page number (0-based) - `meta.pageSize` (number, required) Number of items per page Example: 10 - `meta.total` (number, required) Total number of items Example: 150 - `meta.totalPages` (number, required) Total number of pages Example: 15 - `meta.hasNext` (boolean, required) Whether there is a next page Example: true - `meta.hasPrevious` (boolean, required) Whether there is a previous page ## Response 401 fields (application/json): - `message` (string, required) Error message indicating unauthorized access. Example: "Unauthorized" - `statusCode` (number, required) HTTP status code for unauthorized access. Example: 401 ## Response 400 fields ## Response 403 fields