Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bentlyy/Clinica/llms.txt
Use this file to discover all available pages before exploring further.
Three endpoints expose doctor listings, each serving a different role. Patients use the public route, admins use the authenticated root route, and doctors retrieve their own profile via /me.
Retrieve all doctors without authentication. Intended for patients browsing available providers.Method: GET
Path: /api/doctors/public
Auth required: NoResponse
Returns an array of doctor objects.The doctor’s medical specialty.
The doctor’s contact email.
The ID of the linked user account, if the doctor has one.
The email of the linked user account. Populated via a LEFT JOIN on the users table.
Example
curl --request GET \
--url http://localhost:3000/api/doctors/public
[
{
"id": 1,
"name": "Dr. María García",
"specialty": "Cardiología",
"email": "m.garcia@clinica.com",
"user_id": 5,
"user_email": "m.garcia@clinica.com"
}
]
Retrieve all doctors. Requires an admin JWT token.Method: GET
Path: /api/doctors
Auth required: Yes — admin roleBearer <token> — a JWT obtained from POST /api/auth/login with an account that has the admin role.
Response
Returns the same array structure as the public endpoint. See the Public tab for field descriptions.Error responses
| Status | Condition |
|---|
401 | No token provided or token is invalid. |
403 | Token is valid but the user does not have the admin role. |
Example
curl --request GET \
--url http://localhost:3000/api/doctors \
--header 'Authorization: Bearer <admin_token>'
Retrieve the authenticated doctor’s own profile. The doctor is identified from the JWT token.Method: GET
Path: /api/doctors/me
Auth required: Yes — doctor roleBearer <token> — a JWT obtained from POST /api/auth/login with an account that has the doctor role.
Response
Returns a single doctor object for the authenticated user.The doctor’s medical specialty.
The doctor’s contact email.
The ID of the linked user account.
Error responses
| Status | Condition | Error message |
|---|
401 | No token provided or token is invalid. | — |
403 | Token is valid but the user does not have the doctor role. | — |
404 | No doctor profile found for the authenticated user. | "Doctor profile not found" |
Example
curl --request GET \
--url http://localhost:3000/api/doctors/me \
--header 'Authorization: Bearer <doctor_token>'
{
"id": 1,
"name": "Dr. María García",
"specialty": "Cardiología",
"email": "m.garcia@clinica.com",
"user_id": 5
}