> ## Documentation Index
> Fetch the complete documentation index at: https://docs.medisync.me/llms.txt
> Use this file to discover all available pages before exploring further.

# User Registration

> Create a new healthcare-professional account

## Overview

Registers a new healthcare-professional account. New accounts are created **unverified**; a verification email is sent, and email verification is enforced at [login](/api-reference/auth/login). No authentication is required to call this endpoint, and it is not rate limited. Platform messages are returned in **German**.

## Body Parameters

<ParamField body="firstName" type="string" required>
  First name.
</ParamField>

<ParamField body="lastName" type="string" required>
  Last name.
</ParamField>

<ParamField body="email" type="string" required>
  Professional email address. Validated and normalized; must be unique.
</ParamField>

<ParamField body="password" type="string" required>
  Account password. Minimum 6 characters (no complexity rules enforced).
</ParamField>

<ParamField body="specialty" type="string" required>
  Medical specialty.
</ParamField>

<ParamField body="ehr_system_type" type="string" required>
  EHR system category.
</ParamField>

<ParamField body="ehr_system_name" type="string" required>
  Specific EHR system name.
</ParamField>

<ParamField body="title" type="string">
  Medical title (Dr., Prof.). Optional.
</ParamField>

<ParamField body="anrede" type="string">
  Salutation; stored only when `Herr` or `Frau`.
</ParamField>

<ParamField body="teamInviteToken" type="string">
  Team invitation token. When valid, the new user joins the team and inherits its subscription.
</ParamField>

## Response

Returns `201 Created` with the newly created account under `result`.

<ResponseField name="success" type="boolean">
  `true` when the account is created.
</ResponseField>

<ResponseField name="result" type="object">
  The created account.

  <Expandable title="result">
    <ResponseField name="_id" type="string">Unique user id.</ResponseField>
    <ResponseField name="title" type="string">Medical title.</ResponseField>
    <ResponseField name="firstName" type="string">First name.</ResponseField>
    <ResponseField name="lastName" type="string">Last name.</ResponseField>
    <ResponseField name="email" type="string">Email address.</ResponseField>
    <ResponseField name="specialty" type="string">Medical specialty.</ResponseField>
    <ResponseField name="ehr_system_type" type="string">EHR system category.</ResponseField>
    <ResponseField name="ehr_system_name" type="string">EHR system name.</ResponseField>
    <ResponseField name="isVerified" type="boolean">Always `false` on a new account.</ResponseField>
  </Expandable>
</ResponseField>

## Example Request

```bash theme={null}
curl -X POST https://app.medisync.me/api/register \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Dr.",
    "firstName": "John",
    "lastName": "Doe",
    "email": "doctor@example.com",
    "password": "your_password",
    "specialty": "Cardiology",
    "ehr_system_type": "Epic",
    "ehr_system_name": "Epic MyChart"
  }'
```

## Example Response

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "success": true,
    "result": {
      "_id": "6578a1b2c3d4e5f601234567",
      "title": "Dr.",
      "firstName": "John",
      "lastName": "Doe",
      "email": "doctor@example.com",
      "specialty": "Cardiology",
      "ehr_system_type": "Epic",
      "ehr_system_name": "Epic MyChart",
      "isVerified": false
    }
  }
  ```
</ResponseExample>

<Warning>
  A new account cannot log in until its email address is verified. Registration itself still succeeds even if the verification email cannot be delivered.
</Warning>

## Error Responses

<CodeGroup>
  ```json 400 Validation failed theme={null}
  {
    "error": "Bitte geben Sie ein Passwort mit mindestens 6 Zeichen ein."
  }
  ```

  ```json 409 Email already registered theme={null}
  {
    "error": "Diese E-Mail-Adresse ist bereits registriert."
  }
  ```

  ```json 400 Invalid team invitation token theme={null}
  {
    "error": "Ungültiger Einladungstoken."
  }
  ```

  ```json 500 Registration failed theme={null}
  {
    "error": "Ein Fehler ist bei der Registrierung aufgetreten."
  }
  ```
</CodeGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Login" icon="key" href="/api-reference/auth/login">
    Authenticate and obtain a JWT token.
  </Card>

  <Card title="User Profile" icon="user" href="/api-reference/users/get-profile">
    Retrieve the authenticated user's profile.
  </Card>
</CardGroup>
