API Documentation
BrihanMumbai Fix API overview and request/response behavior.

Base URL

https://brihanmumbai-fix-backend.onrender.com

Authentication Model

Login and register endpoints set secure httpOnly cookies on the backend. Frontend requests usecredentials: 'include'so cookies are sent automatically.

Key Endpoints

  • POST /api/auth/register, POST /api/auth/login, GET /api/auth/me
  • POST /api/complaints, GET /api/complaints, GET /api/complaints/<id>
  • GET /api/feed/preview (public), GET /api/feed (protected)
  • POST /api/admin/login, GET /api/admin/complaints, PATCH /api/admin/complaints/<id>/status

Response Shape

Most endpoints return JSON with success/error patterns consumed by frontend API helpers inlib/api.ts.