User Login
Authentication
User Login
Authenticate with email and password to obtain a JWT token for API access
POST
User Login
Overview
The login endpoint authenticates a healthcare professional and returns a JWT token used to access protected endpoints. It is the primary authentication method for the MediSync platform.No authentication is required to call this endpoint. Platform messages are returned in German.
Body Parameters
string
required
Registered email address. Validated as an email and normalized server-side.
string
required
Account password.
boolean
default:"false"
If
true, issues a longer-lived token. Don’t hard-code an expiry — see Token management.string
TOTP code (or a one-time backup code) for accounts with 2FA enabled. Omit it on the first call to receive the
202 2FA challenge, then resubmit with the code.Response
boolean
true when authentication succeeds.string
JWT token for authenticating subsequent requests.
string
The authenticated user’s id.
string
Medical title (Dr., Prof., …).
string
User’s first name.
string
User’s last name.
boolean
Whether the account has 2FA enabled.
Example Request
Example Response
Two-Factor Authentication
If the account has 2FA enabled andtwoFactorCode is omitted, the endpoint returns 202 Accepted with a challenge instead of a token. Resubmit the same request including a valid twoFactorCode.
Error Responses
Authentication failures use a
failed label alongside error, while validation and rate-limit errors return only error. The API does not return invented English code values — branch on the HTTP status and the fields shown above.Rate Limiting
Login is rate limited. Exceeding a limit returns429 with rateLimited: true; standard RateLimit-* headers and Retry-After are included. Back off for the interval indicated rather than retrying immediately.
Next Steps
Register
Create a new healthcare-professional account.
User Profile
Retrieve the authenticated user’s profile.