List Users (tenant)
Overview
Retrieve a paginated list of users that belong to the current tenant workspace.
Use query parameters to search, filter by role or active status, and match custom metadata fields. The response includes each user summary plus pagination metadata so you can build admin tables and infinite scroll UIs.
When to use this endpoint?
Use List Users when:
- You need to display tenant users in an admin directory or members table.
- You want to search users by name, email, or other searchable fields.
- You are filtering by role, active status, or
metadata.<key>values. - You need pagination details such as total count and next/previous page flags.
GET
{baseUrl}/api/{apiVersion}/client/users?page=1&limit=10- Authentication
- Required (Bearer token)
- Tenant-scoped
- Yes (tenant DB - requires x-client-id)
Request Headers
Query Parameters
Success Response (HTTP 200 OK)
On success, the API returns a paginated list of users for the tenant.
json
{ "success": true, "message": "Users fetched successfully", "data": { "list": [ { "_id": "694b...d8", "name": "Will Smith", "email": "will.smith@example.com", "role": "user", "isActive": true, "isOnline": false, "lastSeen": "2026-06-18T08:55:00.000Z", "metadata": { "workspaceId": "c1" }, "createdAt": "2026-06-01T00:00:00.000Z", "updatedAt": "2026-06-01T00:00:00.000Z" } ], "pagination": { "currentPage": 1, "totalCount": 10, "hasNextPage": true, "hasPreviousPage": false, "pageSize": 10 } }, "error": null}Common Errors
HTTP 200 OK means the list was fetched successfully. Requests fail when tenant headers or authentication are missing or invalid.
Best Practices
- Always send
is-tenant: trueand a validx-client-idfor tenant-scoped user lists. - Keep
limitreasonable for UI tables; usepagination.hasNextPageto load more pages. - Prefer
searchand structured filters over fetching all users client-side. - Discover available metadata keys with Get User Metadata Keys before building
metadata.<key>filters. - Refresh the list after create, update, or delete operations so the UI stays in sync.
Ready to browse users
With a valid Access Token and tenant headers, you can list users and open a single record with Get User Detail using the returned _id.