Base URL: http://localhost:9000
- Method:
POST - URL:
/api/auth/signup - Body (JSON):
{
"accountType": "PATIENT",
"firstName": "Ahmed",
"lastName": "Hassan",
"email": "ahmed@test.com",
"password": "password123",
"phone": "+201234567890"
}- Method:
POST - URL:
/api/auth/signup - Body (JSON):
{
"accountType": "DOCTOR",
"firstName": "Sara",
"lastName": "Ali",
"email": "sara@doctor.com",
"password": "password123",
"phone": "+201987654321"
}- Method:
GET - URL:
/api/auth/verify-email?token=THE_TOKEN_FROM_CONSOLE - Body: None
- Method:
POST - URL:
/api/auth/login - Body (JSON):
{
"email": "ahmed@test.com",
"password": "password123"
}- Response: Returns
token— save it for all endpoints below
Add header to all requests below:
Authorization: Bearer <TOKEN>
- Method:
GET - URL:
/api/users/me - Body: None
- Method:
PATCH - URL:
/api/users/me - Body (JSON):
{
"firstName": "Ahmed Updated",
"lastName": "Hassan Updated",
"phone": "+201112223333"
}- Method:
GET - URL:
/api/users/patients?page=1&limit=10&search=Ahmed - Body: None
- Method:
GET - URL:
/api/users/patients/<PATIENT_USER_ID> - Body: None
- Method:
POST - URL:
/api/users/patients/<PATIENT_USER_ID>/assign - Body (JSON):
{
"doctorId": "<DOCTOR_USER_ID>"
}- Method:
GET - URL:
/api/users/doctors?page=1&limit=10 - Body: None
- Method:
GET - URL:
/api/users/profile/patient-details - Body: None
- Method:
POST - URL:
/api/users/profile/patient-details - Body (JSON):
{
"chronicDiseases": "None",
"medications": "Ibuprofen",
"previousSurgeries": "Appendectomy 2020",
"bloodPressure": "120/80",
"diabetesStatus": "Negative"
}- Method:
GET - URL:
/api/appointments/doctor/<DOCTOR_USER_ID>/availability?date=2026-06-28 - Body: None
- Method:
GET - URL:
/api/appointments?page=1&limit=10 - Body: None
- Method:
POST - URL:
/api/appointments - Body (JSON):
{
"doctorId": "<DOCTOR_USER_ID>",
"date": "2026-06-28T10:00:00.000Z",
"notes": "First consultation"
}- Method:
GET - URL:
/api/appointments/<APPOINTMENT_ID> - Body: None
- Method:
PATCH - URL:
/api/appointments/<APPOINTMENT_ID> - Body (JSON):
{
"status": "COMPLETED",
"notes": "Follow-up needed"
}- Method:
DELETE - URL:
/api/appointments/<APPOINTMENT_ID> - Body: None
- Method:
GET - URL:
/api/chat?page=1&limit=10 - Body: None
- Method:
POST - URL:
/api/chat - Body (JSON):
{
"title": "Brain MRI Questions"
}- Method:
GET - URL:
/api/chat/<CHAT_ID> - Body: None
- Method:
POST - URL:
/api/chat/<CHAT_ID>/messages - Body (JSON):
{
"content": "What does a brain tumor look like on MRI?"
}- Method:
DELETE - URL:
/api/chat/<CHAT_ID> - Body: None
- Method:
POST - URL:
/api/reports/generate - Content-Type:
multipart/form-data - Body (form-data):
- Key:
scan— Type: File — Value: Select an MRI image - Key:
type— Type: Text — Value:BRAIN_SCAN
- Key:
- Method:
GET - URL:
/api/reports/my-reports - Body: None
- Method:
GET - URL:
/api/reports/<REPORT_ID> - Body: None
- Method:
GET - URL:
http://localhost:8000/download/pdf/<REPORT_NAME>.pdf - Body: None
1. POST /api/auth/signup → Create patient account
2. POST /api/auth/signup → Create doctor account
3. GET /api/auth/verify-email → Verify both emails (check console for tokens)
4. POST /api/auth/login → Login as patient → save token
5. POST /api/auth/login → Login as doctor → save token
6. PATCH /api/users/me → Update profile (patient token)
7. POST /api/users/profile/patient-details → Add medical details (patient token)
8. GET /api/users/doctors → List doctors (patient token)
9. POST /api/users/patients/:id/assign → Assign patient to doctor (patient token)
10. GET /api/appointments/doctor/:id/availability → Check slots (patient token)
11. POST /api/appointments → Book appointment (patient token)
12. GET /api/appointments → List appointments (patient token)
13. PATCH /api/appointments/:id → Complete appointment (doctor token)
14. POST /api/chat → Create chat (patient token)
15. POST /api/chat/:id/messages → Send message (patient token)
16. GET /api/chat/:id → Get chat with messages (patient token)
17. POST /api/reports/generate → Upload MRI scan (any token)
18. GET /api/reports/my-reports → List reports
- Replace
<TOKEN>with the JWT token from login response - Replace
<PATIENT_USER_ID>,<DOCTOR_USER_ID>, etc. with actual IDs from signup/login responses - Patient details endpoint uses the authenticated user's ID from the token
- All protected endpoints return
401if token is missing or invalid - Email must be verified before login works