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

| Field | Description |
|-------|-------------|
| id | Unique identifier for the user in the system |
| uid | User's unique identifier, often used for authentication |
| username | User's chosen username for the account |
| email | User's email address |
| dateOfBirth | User's date of birth |
| phoneNumber | User's contact phone number |
| firstName | User's first name |
| lastName | User's last name |
| fullName | User's full name (typically a combination of first and last name) |
| isEmailVerified | Boolean indicating whether the user's email has been verified |
| jobTitle | User's job title or position in the company |
| locale | User's preferred language or regional settings |
| lastActiveAt | Timestamp of the user's last activity in the system |
| createdAt | Timestamp when the user account was created |
| updatedAt | Timestamp when the user account was last updated |
| isOnline | Boolean indicating whether the user is currently online |
| timezone | User's preferred timezone |
| theme | User's preferred UI theme (e.g., light or dark mode) |

The `pageInfo` object provides pagination details for the query results:

| Field | Description |
|-------|-------------|
| totalPages | Total number of pages of results |
| totalItems | Total number of users matching the query |
| page | Current page number |
| perPage | Number of items per page |
| hasNextPage | Boolean indicating if there's a next page of results |
| hasPreviousPage | Boolean indicating if there's a previous page of results |