GET /users/{email}
Get user by email
Retrieves a specific user by their email address
Authentication Required
Authorization: Bearer {token}
header string This header is required to access this endpoint
Required Parameters
email
path string Email address of the user to retrieve
Optional Parameters
Click here to view an exhaustive list of all available parameters
x-account-id
header string The account ID for the request
Try it out
Loading...
Output:
Responses
Description
User retrieved successfully
{ "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"}Description
Unauthorized - not authenticated
{ "error": "string", "status": 0}Description
Forbidden - user does not have required permissions
{ "error": "string", "status": 0}Description
Not found - user with specified email does not exist
{ "error": "string", "status": 0}Description
Internal server error
{ "error": "string", "status": 0}References
#/components/parameters/xAccountIdHeader
in: headername: x-account-idschema: type: stringdescription: The account ID for the requestrequired: false|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 codedescription: Error response object|export interface Error { /** Error message */ error?: string; /** HTTP status code */ status?: number;}Route Source Code
Check out the source code for this route entrypoint here: /users/[email]/route.ts
Or the swagger.yaml spec this documentation was generated from:
/users/swagger.yaml