Skip to main content

API Endpoints

Fetch Paginated Users

  • Endpoint: GET /admin/users?page={page}&limit={limit}&search={query}
  • Description: Retrieves a paginated list of users.
  • Example Response:

Block a User

  • Endpoint: PUT /admin/users/block/{id}
  • Description: Blocks a user, preventing them from logging in.
  • Response:

Delete a User

  • Endpoint: DELETE /admin/users/{id}
  • Description: Deletes a user and all associated data.
  • Response:

Check User Status (Frontend Validation)

If a blocked user attempts to log in, the frontend should check their status:

Conclusion

The User Management system enables administrators to efficiently handle user access and maintain a secure platform. Blocking users prevents access without deleting their accounts, while deletion removes them permanently. The API allows dynamic control over user management processes. For any issues, administrators should ensure users are correctly categorized and that API responses are handled appropriately.