List or Search Users
This endpoint retrieves details of users. It’s best suited to interactive, best-effort search and lookups where slightly stale results are acceptable. With it, you can:
- Specify search criteria for users
- Sort the users to be returned
- Select the fields to be returned
- Specify the number of users to retrieve per page and the page index
This endpoint is not suited for use in critical paths. It is eventually consistent and runs under a short (~2 second) query time limit, so results can be stale and heavy queries can return a 503.
- Do not use this endpoint for authentication, account linking, or logic inside login-flow Actions. Instead, look users up directly by ID or email to get their current state.
- Do not use this endpoint to keep an external system in sync with user data. Instead, subscribe to Event Streams to receive every change as it happens.
- Do not use this endpoint to enumerate or export your entire user base. Instead, run a bulk user export to retrieve the full set.
Use the q query parameter to match users with query string syntax. For full instructions and guidance, see How to List and Search Users.
For efficient queries, prefer indexed top-level fields and exact matches. Certain kinds of queries can be slow and may time out, such as filtering on freeform or multi-value fields (like user-defined attributes in app_metadata or user_metadata) or using leading wildcards.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Page index of the results to return. First page is 0.
x >= 0Number of results per page.
0 <= x <= 100Return results inside an object that contains the total result count (true) or as a direct array of results (false, default).
Field to sort by. Use field:order where order is 1 for ascending and -1 for descending. e.g. created_at:1
Connection filter. Only applies when using search_engine=v1. To filter by connection with search_engine=v2|v3, use q=identities.connection:"connection_name"
Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.
Whether specified fields are to be included (true) or excluded (false).
Query in Lucene query string syntax. Some query types cannot be used on metadata fields, for details see Searchable Fields.
The version of the search engine
v1, v2, v3 If true (default), results are returned in a deterministic order. If false, results may be returned in a non-deterministic order, which can enhance performance for complex queries targeting a small number of users. Set to false only when consistent ordering and pagination is not required.
Response
Users successfully retrieved.
- object[]
- object
ID of the user which can be used when interacting with other APIs.
Email address of this user.
Whether this email address is verified (true) or unverified (false).
Username of this user.
Phone number for this user. Follows the E.164 recommendation.
Whether this phone number has been verified (true) or not (false).
Date and time when this user was created.
Date and time when this user was last updated/modified.
Array of user identity objects when accounts are linked.
User metadata to which this user has read-only access.
User metadata to which this user has read/write access.
URL to picture, photo, or avatar of this user.
Name of this user.
Preferred nickname or alias of this user.
List of multi-factor authentication providers with which this user has enrolled.
Last date and time this user's multi-factor authentication providers were updated.
Last IP address from which this user logged in.
Last date and time this user logged in.
Last date and time this user had their password reset.
Total number of logins this user has performed.
Whether this user was blocked by an administrator (true) or is not (false).
Given name/first name/forename of this user.
Family name/last name/surname of this user.