API Docs

List Users

How to list users using the Blue API.

All users in Company

To list users in a company in Blue, you can use the following query:

query GetListOfUsersInOrganisation {
  companyUserList(companyId: "ENTER COMPANY ID") {
    users {
      id
      uid
      username
      email
      dateOfBirth
      phoneNumber
      firstName
      lastName
      fullName
      isEmailVerified
      jobTitle
      locale
      lastActiveAt
      createdAt
      updatedAt
      isOnline
      timezone
      theme
    }
    pageInfo {
      totalPages
      totalItems
      page
      perPage
      hasNextPage
      hasPreviousPage
    }
  }
}

List of fields returned

FieldDescription
idUnique identifier for the user in the system
uidUser's unique identifier, often used for authentication
usernameUser's chosen username for the account
emailUser's email address
dateOfBirthUser's date of birth
phoneNumberUser's contact phone number
firstNameUser's first name
lastNameUser's last name
fullNameUser's full name (typically a combination of first and last name)
isEmailVerifiedBoolean indicating whether the user's email has been verified
jobTitleUser's job title or position in the company
localeUser's preferred language or regional settings
lastActiveAtTimestamp of the user's last activity in the system
createdAtTimestamp when the user account was created
updatedAtTimestamp when the user account was last updated
isOnlineBoolean indicating whether the user is currently online
timezoneUser's preferred timezone
themeUser's preferred UI theme (e.g., light or dark mode)

The pageInfo object provides pagination details for the query results:

FieldDescription
totalPagesTotal number of pages of results
totalItemsTotal number of users matching the query
pageCurrent page number
perPageNumber of items per page
hasNextPageBoolean indicating if there's a next page of results
hasPreviousPageBoolean indicating if there's a previous page of results