GET
/users/countCount users
Returns a total count of all users that match the given filtering criteria.
email_addressarray<string>optional
Counts users with the specified email addresses.
Accepts up to 100 email addresses.
Any email addresses not found are ignored.
phone_numberarray<string>optional
Counts users with the specified phone numbers.
Accepts up to 100 phone numbers.
Any phone numbers not found are ignored.
external_idarray<string>optional
Counts users with the specified external IDs.
Accepts up to 100 external IDs.
Any external IDs not found are ignored.
usernamearray<string>optional
Counts users with the specified usernames.
Accepts up to 100 usernames.
Any usernames not found are ignored.
web3_walletarray<string>optional
Counts users with the specified web3 wallet addresses.
Accepts up to 100 web3 wallet addresses.
Any web3 wallet addresses not found are ignored.
user_idarray<string>optional
Counts users with the user IDs specified.
Accepts up to 100 user IDs.
Any user IDs not found are ignored.
organization_idarray<string>optional
Returns users that have memberships to the given organizations. For each organization ID, the `+` and `-`
can be prepended to the ID, which denote whether the respective organization should be included or
excluded from the result set. Accepts up to 100 organization IDs.
querystringoptional
Counts users that match the given query.
For possible matches, we check the email addresses, phone numbers, usernames, web3 wallets, user IDs, first and last names.
The query value doesn't need to match the exact value you are looking for, it is capable of partial matches as well.
email_address_querystringoptional
Counts users with emails that match the given query, via case-insensitive partial match.
For example, `email_address_query=ello` will match a user with the email `HELLO@example.com`,
and will be included in the resulting count.
phone_number_querystringoptional
Counts users with phone numbers that match the given query, via case-insensitive partial match.
For example, `phone_number_query=555` will match a user with the phone number `+1555xxxxxxx`,
and will be included in the resulting count.
username_querystringoptional
Counts users with usernames that match the given query, via case-insensitive partial match.
For example, `username_query=CoolUser` will match a user with the username `SomeCoolUser`,
and will be included in the resulting count.
name_querystringoptional
Returns users with names that match the given query, via case-insensitive partial match.
bannedbooleanoptional
Counts users which are either banned (`banned=true`) or not banned (`banned=false`).
last_active_at_beforeintegeroptional
Returns users whose last session activity was before the given date (with millisecond precision).
Example: use 1700690400000 to retrieve users whose last session activity was before 2023-11-23.
last_active_at_afterintegeroptional
Returns users whose last session activity was after the given date (with millisecond precision).
Example: use 1700690400000 to retrieve users whose last session activity was after 2023-11-23.
last_active_at_sinceintegeroptional
Returns users that had session activity since the given date.
Example: use 1700690400000 to retrieve users that had session activity from 2023-11-23 until the current day.
Deprecated in favor of `last_active_at_after`.
created_at_beforeintegeroptional
Returns users who have been created before the given date (with millisecond precision).
Example: use 1730160000000 to retrieve users who have been created before 2024-10-29.
created_at_afterintegeroptional
Returns users who have been created after the given date (with millisecond precision).
Example: use 1730160000000 to retrieve users who have been created after 2024-10-29.
last_sign_in_at_beforeintegeroptional
Counts users whose last sign-in was before the given date (with millisecond precision).
Example: use 1700690400000 to count users whose last sign-in was before 2023-11-23.
last_sign_in_at_afterintegeroptional
Counts users whose last sign-in was after the given date (with millisecond precision).
Example: use 1700690400000 to count users whose last sign-in was after 2023-11-23.
providerstringoptional
Counts users with external accounts for the specified OAuth provider.
Must be used in combination with the `provider_user_id` parameter.
For example, use `provider=oauth_google&provider_user_id=12345` to count users with Google provider user ID 12345.
Accepts up to 100 providers.
provider_user_idarray<string>optional
Counts users with the specified provider user IDs for a specific provider.
Must be used in combination with the `provider` parameter.
For example, use `provider=oauth_google&provider_user_id=12345` to count users with Google provider user ID 12345.
Accepts up to 100 provider user IDs.
Any provider user IDs not found are ignored.
200Success
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
total_countintegerrequired
422Invalid request parameters
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
Error handling
A 422 is returned: Invalid request parameters.