The ReadRealm API uses JSON Web Tokens (JWT) for authentication. After logging in, include the token in every request to a protected endpoint using theDocumentation 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.
Authorization: Bearer header.
All authentication endpoints are prefixed with
/auth.Register a new account
POST /auth/register
Creates a new user account. Returns a success message — no token is issued at registration.
Request body
Display name for the account.
A valid email address. Must be unique across all accounts.
Account password. Minimum 6 characters.
URL or path to the user’s profile picture. Optional.
Response
Confirmation message on success. Value:
"User registered successfully".Example
Log in
POST /auth/login
Authenticates an existing user and returns a JWT access token and a refresh token.
Request body
The account email address.
The account password. Minimum 6 characters.
Response
JWT used to authenticate subsequent API requests. Expires after 1 hour.
UUID token used to obtain a new access token. Valid for 3 days.
Unique identifier of the authenticated user.
Example
Use the token in requests
Pass theaccessToken from the login response in the Authorization header of every request to a protected endpoint.
Change password
PUT /auth/change-password
Updates the password for the currently authenticated user. Requires a valid JWT.
Request headers
Bearer <your_access_token>Request body
The user’s current password.
The replacement password.
Response
Confirmation on success. Value:
"Password changed successfully".Example
Email verification
ReadRealm uses a one-time password (OTP) flow to verify email addresses. The OTP is sent to the user’s email inbox.Submit the OTP
Call Response:
POST /auth/verify-email with the email address and the OTP from the inbox.The email address being verified.
The one-time password received by email.
Value:
"Email verified successfully" on success. Returns 422 Unprocessable Entity if the OTP is invalid or expired.Forgot password
POST /auth/forgot-password
Resets the password for an account identified by email address. No authentication token is required.
Verify the user’s email address before allowing a password reset to prevent unauthorized account takeover.
Request body
The email address of the account to update.
The new password to set for the account.
Response
Confirmation on success. Value:
"Password changed successfully".