Skip to main content

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.

Use this endpoint to create a new patient account. On success, the user is persisted to the database with a hashed password and the new record is returned. The account role defaults to user (the patient role).

Request

Method: POST
Path: /api/auth/register
Auth required: No

Body

email
string
required
The email address for the new account. Must be unique — registering with an existing email returns a 400 error.
password
string
required
The plain-text password. Clinica hashes this with bcrypt before storing it.

Response

201 — Created

Returns the newly created user record.
id
integer
required
The unique identifier for the new user.
email
string
required
The email address associated with the account.

Error responses

StatusConditionError message
400email or password missing from request body"Email and password required"
400An account with the given email already exists"Email already exists"
Error responses use the shape { "error": "<message>" }.

Example

cURL
curl --request POST \
  --url http://localhost:3000/api/auth/register \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "patient@example.com",
    "password": "securepassword"
  }'
Response
{
  "id": 42,
  "email": "patient@example.com"
}

Build docs developers (and LLMs) love