The Users API manages reader accounts. It handles registration, profile retrieval, and account updates. User IDs returned from these endpoints are referenced throughout the Books and Chat APIs for bookmarks, reviews, and messages.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/aliammari1/readrealm/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint summary
| Method | Path | Description |
|---|---|---|
POST | /user | Create a new user account |
GET | /user | List all users |
GET | /user/:email | Find a user by email address |
GET | /user/userId/:id | Find a user by ID |
GET | /user/profile/:id | Get a user’s profile |
PUT | /user/:id | Update a user account |
DELETE | /user/:id | Delete a user account |
POST /user
Registers a new user account.Request body
Display name for the user.
Email address. Must be a valid email format.
Account password. Maximum 100 characters.
URL or base64-encoded image for the user’s avatar. Optional.
Response
MongoDB document ID assigned to the new user.
Display name.
Email address.
Profile picture URL, if provided.
User role. Defaults to
"user".Timestamp of email verification.
null until verified.GET /user
Returns all registered users.Response
Array of user objects. Each object contains the fields described in the POST /user response section.GET /user/:email
Looks up a single user by their email address.The
:email segment must be URL-encoded (e.g. alice%40example.com).Path parameters
URL-encoded email address of the user.
Response
A single user object, or404 if no user with that email exists.
GET /user/userId/:id
Looks up a single user by their MongoDB document ID.Path parameters
MongoDB
_id string of the user.Response
A single user object, or404 if no user with that ID exists.
GET /user/profile/:id
Retrieves the public profile for a user by ID. Internally equivalent toGET /user/userId/:id — both resolve using findById.
Path parameters
MongoDB
_id string of the user.Response
A single user object.PUT /user/:id
Replaces user fields with the provided values. Unspecified fields retain their current values (partial update viaPartialType).
Path parameters
MongoDB
_id string of the user to update.Request body
All fields are optional:New display name.
New email address. Must be a valid email format.
New password. Maximum 100 characters.
New profile picture URL or base64 image.
Response
The updated user object.DELETE /user/:id
Permanently deletes a user account.Path parameters
MongoDB
_id string of the user to delete.Response
The deleted user document.User object reference
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Display name |
email | string | Yes | Email address |
password | string | Yes | Hashed password (max 100 chars) |
profilePicture | string | No | Avatar URL or base64 image (max 1000 chars) |
role | string | Yes | Account role; defaults to "user" |
emailVerifiedAt | Date | No | Timestamp of email verification |