Skip to main content
POST
/
patients
/
login
Patient Login
curl --request POST \
  --url https://api.example.com/patients/login \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "<string>",
  "password": "<string>"
}
'
Invalid email or password.
Authenticates a patient using their email and password.

Request Body

email
string
required
Patient’s registered email address.
password
string
required
Patient’s account password.

Response

Returns a text message indicating the login status.

Example Request

cURL
curl -X POST http://localhost:8080/patients/login \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "password": "securePassword123"
  }'

Example Response

200 OK
Login successful!

Error Responses

Invalid email or password.
{
  "error": "Internal server error",
  "message": "An unexpected error occurred"
}

Notes

  • Both email and password must match an existing patient account
  • Authentication is case-sensitive for the password
  • This endpoint does not create a session or return a token in the current implementation
  • Returns 401 status code if credentials are invalid

Build docs developers (and LLMs) love