Institution User Creation API
This guide explains how to create a new user through the institution API.
info
This endpoint is only available for accredited institutions. Contact us to become accredited.
Endpoint
POST /v2/institutions/users
Authentication is performed with the X-Institution-API-Key header.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | Email address of the new user. |
name | string | no | Display name of the user. |
language | string | no | Preferred language (default de). |
send_pw_reset_email | bool | no | Whether to send a password reset email. |
institution_admin | bool | no | Whether the created user should be an institution admin. |
Example request using curl:
curl -X POST https://api.44ai.ch/v2/institutions/users \
-H "X-Institution-API-Key: <INSTITUTION_KEY>" \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","name":"Jane Doe","language":"de","send_pw_reset_email":true}'
Successful Response
200 OK with the following payload:
{
"id": "<user-id>",
"email": "user@example.com",
"name": "Jane Doe",
"language": "de",
"institution_id": "<institution-id>",
"is_institution_admin": true,
"password_reset_sent": true,
"created": "2024-01-01T12:00:00Z",
"api_key": ""
}
The endpoint automatically adds the user to the institution's default patient and template groups if configured. User creation will fail if the institution disabled user creation or if the email already exists.