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

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

References

#/components/parameters/xAccountIdHeader

in: header
name: x-account-id
schema:
type: string
description: The account ID for the request
required: false

#/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
description: Error response object

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