GET /users
Get all users in the system
Retrieves a list of all users in the system with their details
Authentication Required
Authorization: Bearer {token}
header string This header is required to access this endpoint
Required Parameters
x-account-id
header string Account ID for the request
Optional Parameters
Click here to view an exhaustive list of all available parameters
page
query integer Page number for pagination
pageSize
query integer Number of users per page
search
query string Search users by email or name
teamId
query integer Filter users by team ID
active
query boolean Filter users by active status
Try it out
Loading...
Output:
Responses
Description
Users retrieved successfully
{ "users": [ { "id": 0, "email": "string", "name": "string", "active": false, "teamId": 0, "phone": "string", "imgSrc": "string", "notificationPreferences": {}, "createdBy": "string", "updatedBy": "string", "createdAt": "string", "updatedAt": "string", "accounts": [ { "accountId": "string", "accountName": "string", "usersPrimaryAccount": false, "accountAdmin": false } ], "flatRolesList": [ "string" ], "flatPermissionsList": [ "string" ], "token": "string" } ], "totalCount": 0, "totalPages": 0, "currentPage": 0}Description
Unauthorized - not authenticated
{ "error": "string", "status": 0, "message": "string"}Description
Forbidden - user does not have required permissions
{ "error": "string", "status": 0, "message": "string"}Description
Internal server error
{ "error": "string", "status": 0, "message": "string"}References
#/components/parameters/xAccountIdHeader
in: headername: x-account-idschema: type: stringdescription: Account ID for the requestrequired: trueexample: "2311"|export type xAccountIdHeader = any; // Schema type not fully supported#/components/schemas/User
type: objectproperties: id: type: integer description: User ID email: type: string format: email description: User's email address name: type: string description: Full name of the user active: type: boolean description: Whether the user is active teamId: type: integer description: ID of the team the user belongs to phone: type: string description: User's phone number imgSrc: type: string description: URL to the user's profile image notificationPreferences: type: object description: User's notification preferences createdBy: type: string description: Email of the user who created this user updatedBy: type: string description: Email of the user who last updated this user createdAt: type: string format: date-time description: Creation timestamp updatedAt: type: string format: date-time description: Last update timestamp accounts: type: array description: List of accounts the user has access to items: type: object properties: accountId: type: string accountName: type: string usersPrimaryAccount: type: boolean accountAdmin: type: boolean flatRolesList: type: array description: List of user roles items: type: string flatPermissionsList: type: array description: List of user permissions items: type: string token: type: string description: Authentication token (only included in certain responses)|export interface User { /** User ID */ id?: number; /** User's email address */ email?: string; /** Full name of the user */ name?: string; /** Whether the user is active */ active?: boolean; /** ID of the team the user belongs to */ teamId?: number; /** User's phone number */ phone?: string; /** URL to the user's profile image */ imgSrc?: string; /** User's notification preferences */ notificationPreferences?: {}; /** Email of the user who created this user */ createdBy?: string; /** Email of the user who last updated this user */ updatedBy?: string; /** Creation timestamp */ createdAt?: Date; /** Last update timestamp */ updatedAt?: Date; /** List of accounts the user has access to */ accounts?: { accountId?: string; accountName?: string; usersPrimaryAccount?: boolean; accountAdmin?: boolean; }[]; /** List of user roles */ flatRolesList?: string[]; /** List of user permissions */ flatPermissionsList?: string[]; /** Authentication token (only included in certain responses) */ token?: string;}#/components/schemas/Error
type: objectproperties: error: type: string description: Error message status: type: integer description: HTTP status code message: type: string description: Detailed error messagedescription: Error response objectrequired: - error|export interface Error { /** Error message */ error: string; /** HTTP status code */ status?: number; /** Detailed error message */ message?: string;}Route Source Code
Check out the source code for this route entrypoint here: /users/route.ts
Or the swagger.yaml spec this documentation was generated from:
/users/swagger.yaml