Every protected endpoint in Clinica requires a valid JWT token. You get that token by registering an account and then logging in. Once you have the token, you include it in every request using 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. Tokens are valid for 1 day from the moment they are issued.
Register an account
Send aPOST request to /api/auth/register with your email and password. If the email is not already taken, you’ll receive your user id and email back.
Log in
Send aPOST request to /api/auth/login with the same credentials. You’ll receive a JWT token that you’ll use in all subsequent requests.
Use the token in requests
Include the token in theAuthorization header as a Bearer token on every request to a protected endpoint:
Bearer <token> — note the space between Bearer and the token string.
Error responses
| Status | Error message | Meaning |
|---|---|---|
401 | Token required | The Authorization header was missing from the request. |
401 | Invalid token | The token is malformed, has been tampered with, or has expired. |
403 | Forbidden | Your account role does not have permission to access that endpoint. |
Tokens are stateless — there is no server-side session to invalidate. If your token is compromised before it expires, log in again with your credentials to obtain a new token.