User API Filters

Filter parameters to help you filter the user data retrieved via our User API.

Filter Parameters for /api/users GET Endpoint

The GET endpoint /api/users to retrieve users provides a filter parameter that supports filtering using the SCIM notation.

PropertyFilter operatorAllowed values
groupsis member (eq)
not member (ne)
staffbase.creationTypeequal to (eq)
  • bonding
  • csv
  • direct
  • ldap
  • scim
  • sso
User Role Type
equal to (eq)
  • admin
  • editor
  • moderator
  • managingEditor
  • reader
staffbase.spaceis member (eq){spaceID}
staffbase.statusequal to (eq)
  • activated (default)
  • deactivated
  • pending
The point in time when the user was created in the platform. The date will be updated to the date of the user activation (date of first time registration of the user).
gt, ge, le, lt, eq, neThe value for the point in time is dynamic. Examples:
  • 2022-05-30
  • 2022-05-30T10:00
  • 2022-05-30T10:00:00.000Z
The point in time when the user was last updated.
gt, ge, le, lt, eq, neThe value for the point in time is dynamic. Examples:
  • 2021-07-07
  • 2021-07-07T10:00
  • 2021-07-07T10:00:00.000Z
User typepresent (pr)
  • emails
  • externalId
  • password
  • staffbase.recoveryCode
  • userName


1// Only members of the given group ID
2groups eq "604fab5e830203614e6fa59d"
4// Only members part of the given space ID eq "5fc7743d3dd910548d350a2a"
7// Only registered admin users
8staffbase.status eq "activated" and staffbase.role eq "admin"
10// Only users created via CSV import or SSO
11staffbase.creationType eq "csv" or staffbase.creationType eq "sso"
13// Custom profile fields (use the profile field ID for data import)
14profile.{fieldID} eq "value"
16// -------------------- //
17// Different User Types //
18// -------------------- //
20// Only users with primary email or username and Staffbase password
21(emails pr or userName pr) and password pr
23// Only access code users (no primary email and username)
24(not (emails pr) and not (userName pr) and password pr)
26// Only SSO users (identifier, but no Staffbase password)
27(externalId pr and not (password pr))
29// ---------------------- //
30// Filter for Date & Time //
31// ---------------------- //
33// All users that were created since day = 2021-01-01, time = 10:00
34created gt "2021-01-01T10:00"
36// All users that were created before day = 2022-01-01
37created lt "2022-01-01"
39// All users that were updated since day = 2021-07-07, time = 10:00
40updated gt "2021-07-07T10:00"
42// All users that were updated before day = 2021-05-24
43updated lt "2021-05-24"

Since filter is a URL parameter, whitespaces (space = %20) and quotes (" = %22) have to be URL encoded.

Example: only access code users, so no existing primary email and username

Read more