The users search API lets you find, filter and analyze users within your organization using flexible Typesense-powered queries. You can search by name, email, or user UID.

Example use cases

  • Get all users in the organization

    {
      "query_by": "*",
      "q": "*"
    }
    
  • Find users by email

    {
      "query_by": "*",
      "filter_by": "userEmail:=john.doe@company.com",
      "q": "*"
    }
    

Searchable fields

Only the following fields can be used for searching:

FieldTypeDescription
namestringUser’s full name
emailstringUser’s email address
uidstringUnique user UID

User search response fields

Below are all the fields you may see in a user search result. Teams and sidebar preferences are included by default.

Core fields

FieldTypeDescription
idstringUnique user identifier
uidstringUnique user UID
authIdstringAuthentication ID
organizationIdstringOrganization ID
namestringUser’s full name
emailstringUser’s email address
userTypestringUser type (ORG_ADMIN, BOT_USER, etc.)
isActivebooleanWhether the user is active
statusstringUser status (ACTIVE, INACTIVE, etc.)
primaryTeamIdstringPrimary team ID (can be null)
lastLoginAtstringLast login timestamp (ISO8601)
metadataobjectCustom metadata
avatarUrlstringUser avatar URL
timezonestringUser’s timezone
externalSinksarrayExternal integrations
createdAtstringCreation timestamp (ISO8601)
updatedAtstringLast update timestamp (ISO8601)
deletedAtstringDeletion timestamp (ISO8601)
businessHoursConfigobjectBusiness hours configuration

Default extended fields

These fields are included in every response:

FieldTypeDescription
teamsarrayArray of teams the user belongs to
sidebarPreferencesobjectUser’s sidebar preferences

Team structure

When teams is included, each team object contains:

FieldTypeDescription
idstringTeam identifier
namestringTeam name
iconstringTeam icon
colorstringTeam color
identifierstringTeam identifier
descriptionstringTeam description
teamOwnerstringTeam owner name
teamOwnerIdstringTeam owner ID
isActivebooleanWhether team is active
isPrivatebooleanWhether team is private
createdAtstringTeam creation timestamp
updatedAtstringTeam update timestamp
isDefaultTeambooleanWhether this is the default team

When sidebarPreferences is included, it contains:

FieldTypeDescription
openTeamsobjectOpen teams configuration
pinnedTeamsarrayArray of pinned team IDs
teamOrderarrayTeam display order
lastTeamstringLast accessed team ID

For a full list, see the UserSearchResponseDto in the API reference.


Filtering options

You can filter users using the filter_by parameter with Typesense syntax. The following filters are available:

Available filters

  • By user ID: userId:=URR9A99BDJ
  • By email: userEmail:=user@example.com
  • By name: userName:=shakthi

Combined filters

You can combine multiple filters using &&:

{
  "query_by": "name",
  "filter_by": "userId:=USER123ABC&&userEmail:=john.doe@company.com&&userName:=john",
  "q": "*"
}

Filter examples

  • Find user by email only

    {
      "filter_by": "userEmail:=john.doe@company.com"
    }
    
  • Find user by name only

    {
      "filter_by": "userName:=john"
    }
    
  • Find user by UID only

    {
      "filter_by": "userId:=USER123ABC"
    }