Get Users
Retrieve a list of all users in the system. This endpoint returns basic user information including ID, email, and username.Headers
Bearer token for authentication
Response
Success message
Response Example
This endpoint returns only public user information. Sensitive fields like password, authToken, and verificationToken are not included in the response.
Error Responses
Error message describing what went wrong
HTTP status code indicating the error type
Use Cases
This endpoint is commonly used for:- User Search: Finding users to share notes with
- Autocomplete: Populating user selection dropdowns
- Team Management: Displaying team members
- Social Features: Showing available users for mentions or collaborations
Security
The endpoint requires a valid authentication token in the Authorization header. The token is validated using theauthTokenValidation function before any user data is returned.
Data Privacy
The response intentionally excludes sensitive user data:- Password (hashed)
- Authentication tokens
- Email verification tokens
- Email verification status