Skip to content

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

x-account-id   header string

Account ID for the request

email   path string

Email address of the user to retrieve

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"
}

References

#/components/parameters/xAccountIdHeader

in: header
name: x-account-id
schema:
type: string
description: Account ID for the request
required: true
example: "2311"

#/components/schemas/User

type: object
properties:
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)

#/components/schemas/Error

type: object
properties:
error:
type: string
description: Error message
status:
type: integer
description: HTTP status code
message:
type: string
description: Detailed error message
description: Error response object
required:
- error

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