Exchange valid credentials for a signed JWT token. Include this token in theDocumentation 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.
Authorization header of subsequent requests to access protected endpoints.
Request
Method:POSTPath:
/api/auth/loginAuth required: No
Body
The email address of an existing Clinica account.
The account password.
Response
200 — OK
Returns a signed JWT token.A signed JWT. Valid for 24 hours. The token payload contains:
| Claim | Type | Description |
|---|---|---|
id | integer | The authenticated user’s ID. |
email | string | The authenticated user’s email. |
role | string | The user’s role: patient, doctor, or admin. |
Error responses
| Status | Condition | Error message |
|---|---|---|
400 | email or password missing from request body | "Email and password required" |
400 | Credentials do not match any account | "Invalid credentials" |
{ "error": "<message>" }.
Example
cURL
Response
Using the token
Pass the token in theAuthorization header for all requests that require authentication:
cURL
Tokens expire after 24 hours. When a token expires, the user must log in again to receive a new one.