GET /users – Retrieves user(s).
Headers:
Authorization: Bearer <access_token>
Content-Type: application/json or application/x-www-form-urlencoded
Body:
Path Parameters:
Query Parameters:
provider
q
email:"user@district123.com"
pageSize
page
sort
created_at:-1
fields
include_fields
true
false
userPoolId
limit
lastEvaluatedKey
200 OK
400
401
404
500
{ "error": "Detailed error message here"} Copy
{ "error": "Detailed error message here"}
GET /users?q=email:"user@district123.com" Copy
GET /users?q=email:"user@district123.com"
{ "id": "user_123", "email": "user@district123.com", "name": "John Doe", "blocked": false, "emailVerified": true, "createdAt": "2025-09-12T12:00:00Z", "updatedAt": "2025-09-12T12:00:00Z", "appMetadata": { // ...app metadata fields... }, "userMetadata": { // ...user metadata fields... } // Additional user fields} Copy
{ "id": "user_123", "email": "user@district123.com", "name": "John Doe", "blocked": false, "emailVerified": true, "createdAt": "2025-09-12T12:00:00Z", "updatedAt": "2025-09-12T12:00:00Z", "appMetadata": { // ...app metadata fields... }, "userMetadata": { // ...user metadata fields... } // Additional user fields}
GET /users?userPoolId=us-east-1_1234test&limit=10&next=base64_encoded_pagination_token&provider=cognito-user Copy
GET /users?userPoolId=us-east-1_1234test&limit=10&next=base64_encoded_pagination_token&provider=cognito-user
[ { "id": "generated_user_id", "email": "user@example.com", "name": "users full name", "username": "same as id", "emailVerified": "true", "provider": "provider", "connection": "userpool user is associated to", "firstName": "John", "lastName": "Doe", "phoneNumber": "+1234567890", "phoneVerified": "true", "status": "ACTIVE", "createdAt": "2023-12-20T00:00:00Z", "updatedAt": "2023-12-20T00:00:00Z", "disabled": false, "blocked": false, "principalId": "id associated to user", "legacyOnlineOrderingId": "id associated to user", "districtId": "district id associated to user", "admin": "admin role", "role": "role associated to user", "erpUserId": "erp id", "erpTenants": "string list of tenants", "appMetadata": { "key": "value" }, "userMetadata": { "siteId": "siteId", "homeroomId": "homeroomId", } } ], "page": { "size": 100, "next": "base64 token" } Copy
[ { "id": "generated_user_id", "email": "user@example.com", "name": "users full name", "username": "same as id", "emailVerified": "true", "provider": "provider", "connection": "userpool user is associated to", "firstName": "John", "lastName": "Doe", "phoneNumber": "+1234567890", "phoneVerified": "true", "status": "ACTIVE", "createdAt": "2023-12-20T00:00:00Z", "updatedAt": "2023-12-20T00:00:00Z", "disabled": false, "blocked": false, "principalId": "id associated to user", "legacyOnlineOrderingId": "id associated to user", "districtId": "district id associated to user", "admin": "admin role", "role": "role associated to user", "erpUserId": "erp id", "erpTenants": "string list of tenants", "appMetadata": { "key": "value" }, "userMetadata": { "siteId": "siteId", "homeroomId": "homeroomId", } } ], "page": { "size": 100, "next": "base64 token" }
The API Gateway event containing the request.
A Promise resolving to an API Gateway-compatible response.
GET /users – Retrieves user(s).
Remarks
📥 Request
Headers:
Authorization: Bearer <access_token>(required)Content-Type: application/json or application/x-www-form-urlencoded(required)Body:
Path Parameters:
Query Parameters:
provider: The authentication provider (optional). Defaults to auth0-user.q: Query string to search for users (e.g.,email:"user@district123.com")pageSize: Number of users to return (default: 1)page: Page number to retrieve (default: 0)sort: Field to sort by (e.g.,created_at:-1for descending)fields: Comma-separated list of fields to include in the responseinclude_fields: Whether to include only the specified fields (trueorfalse)userPoolId: The Cognito user pool ID (required for Cognito)limit: Maximum number of users to return (default: 60, max: 60)lastEvaluatedKey: Base64 encoded pagination token from previous response📤 Response
200 OK– Returns a JSON-stringified UsersQueryResponse object.❗ Errors
400401404500Error Response Format
📦 Examples
📥 Auth0 Request
📤 Auth0 Response Example
📥 Cognito Request
📤 Cognito Response Example