Account and sign-in endpoints
Sign-in, registration, MFA, single sign-on, onboarding and personal API tokens. Paths are relative to the address of your Simcha DB Studio server.
These endpoints are never available through the MCP server: Signing in, sessions, passwords, MFA, single sign-on and API tokens are kept out of AI clients.
| Method | Path | What it does |
|---|---|---|
| GET | /api/auth/setup-status | Check whether the first account is needed |
| POST | /api/auth/setup-admin | Create the first administrator |
| POST | /api/auth/login | Sign in with email and password |
| POST | /api/auth/register | Create a user with a password |
| GET | /api/auth/password-policy | Show the password rule |
| POST | /api/auth/request-reset | Request a password reset email |
| POST | /api/auth/reset-password | Set a new password with a reset token |
| GET | /api/auth/me | Get the signed-in user |
| GET | /api/auth/session | Check whether this browser is signed in |
| POST | /api/auth/logout | Sign out |
| GET | /api/auth/users | List all users |
| PUT | /api/auth/users/:id/role | Change the role of a user |
| DELETE | /api/auth/users/:id | Deactivate a user |
| POST | /api/auth/verify | Check a session token |
| POST | /api/auth/mfa/verify | Finish sign-in with an MFA code |
| POST | /api/auth/mfa/setup | Start MFA enrollment |
| POST | /api/auth/mfa/enable | Turn on MFA |
| POST | /api/auth/mfa/disable | Turn off MFA |
| GET | /api/auth/mfa/status | Show whether MFA is on |
| GET | /api/auth/tokens | List your personal API tokens |
| POST | /api/auth/tokens | Create a personal API token |
| DELETE | /api/auth/tokens/:id | Revoke a personal API token |
| POST | /api/onboarding/provision-user | Invite a user |
| GET | /api/onboarding/approve | Approve a sign-up from an approval link |
| POST | /api/onboarding/resend-invite | Resend an invitation |
| GET | /api/auth/idp/saml/login | Start SAML sign-in |
| POST | /api/auth/idp/saml/callback | Receive the SAML sign-in response |
| GET | /api/auth/idp/oidc/login | Start OpenID Connect sign-in |
| GET | /api/auth/idp/oidc/callback | Receive the OpenID Connect sign-in response |
| POST | /api/auth/idp/ldap/login | Sign in with LDAP |
| GET | /api/auth/idp/status | Show which sign-in methods are on |
| GET | /api/auth/idp/config | Get the single sign-on settings |
| PUT | /api/auth/idp/config | Change the single sign-on settings |
GET /api/auth/setup-status
Reports whether any user exists yet: needsSetup is true and userCount is 0 on a new installation. No sign-in is needed.
Reads only · Role: Any signed-in user · Not available through the MCP server
No inputs.
POST /api/auth/setup-admin
Creates the first administrator account and returns it with a session token. Refused once any user exists, and when the password breaks the password rule.
Changes data · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
email (body) | string, required | The administrator email address |
password (body) | string, required | The password. It must meet the password rule shown by account_password_policy |
name (body) | string, required | The administrator name |
POST /api/auth/login
Checks the email and password, sets the session cookie and returns the user, the session expiry and, unless the request comes from the browser app, a session token; when the account uses MFA it returns mfaRequired and an mfaToken instead, to finish with account_mfa_verify. Wrong passwords count toward the account lockout. Locked accounts, accounts that use single sign-on, users without a seat, and non-administrators while password sign-in is limited to administrators are refused.
Changes data · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
email (body) | string, required | The account email address |
password (body) | string, required | The account password |
POST /api/auth/register
Creates an active user who signs in with a password. Refused when the email is already used, no seat is free or the password breaks the password rule. Only a session token is accepted; personal API tokens are refused.
Changes data · Role: Admin · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
email (body) | string, required | The email address, a valid email address of up to 254 characters |
name (body) | string, required | The full name, up to 255 characters |
role (body) | one of admin, release_manager, approver, user, optional | The built-in role. Defaults to user |
password (body) | string, required | The password. It must meet the password rule shown by account_password_policy |
GET /api/auth/password-policy
Returns the minimum password length, whether upper and lower case letters, a digit and a symbol are required, and the rule as a sentence. No sign-in is needed.
Reads only · Role: Any signed-in user · Not available through the MCP server
No inputs.
POST /api/auth/request-reset
Emails a password reset link, valid for 60 minutes, when the email belongs to an active user and email is set up. The answer is the same whether or not the account exists.
Changes data · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
email (body) | string, required | The account email address |
POST /api/auth/reset-password
Sets a new password using the token from a reset or invitation link, and ends the sessions the account already had. Refused when the token is invalid or expired or the password breaks the password rule.
Changes data · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
token (body) | string, required | The token from the reset or setup link |
newPassword (body) | string, required | The new password. It must meet the password rule shown by account_password_policy |
GET /api/auth/me
Returns the signed-in user with ID, email, name, role, sign-in provider, status and last sign-in, and when the session expires. Only a session token is accepted; personal API tokens are refused.
Reads only · Role: Any signed-in user · Not available through the MCP server
No inputs.
GET /api/auth/session
Returns signedIn true with the user and when the session expires, or signedIn false, with the reason when the session was ended. A session cookie that no longer works is cleared. No sign-in is needed.
Reads only · Role: Any signed-in user · Not available through the MCP server
No inputs.
POST /api/auth/logout
Ends the session sent with the request, the session cookie or a session token in the Authorization header, on every app container, and clears the cookie. Personal API tokens are revoked separately.
Changes data · Role: Any signed-in user · Not available through the MCP server
No inputs.
GET /api/auth/users
Lists every user, newest first, with role, sign-in provider, status and last sign-in. Only a session token is accepted; personal API tokens are refused.
Reads only · Role: Admin · Not available through the MCP server
No inputs.
PUT /api/auth/users/:id/role
Sets the built-in role of a user. The only active administrator cannot be given another role. Only a session token is accepted; personal API tokens are refused.
Changes data · Role: Admin · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The user ID |
role (body) | one of admin, release_manager, approver, user, required | The new built-in role |
DELETE /api/auth/users/:id
Deactivates a user so they can no longer sign in; the account is kept. You cannot deactivate your own account or the only active administrator. Only a session token is accepted; personal API tokens are refused.
Changes data and can remove or overwrite it · Role: Admin · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The user ID |
POST /api/auth/verify
Checks a session token and returns valid true with its user, or valid false when the token is invalid or expired, its user is missing or inactive, or the password changed after it was issued (401 SESSION_ENDED).
Reads only · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
token (body) | string, required | The session token to check |
POST /api/auth/mfa/verify
Exchanges the mfaToken from account_sign_in and a current authenticator or backup code for a session, answered like account_sign_in. Wrong codes count toward the account lockout, a locked account is refused with 423, and a used backup code cannot be used again.
Changes data · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
mfaToken (body) | string, required | The mfaToken returned by account_sign_in, valid for 5 minutes |
code (body) | string, required | A 6-digit authenticator code or a backup code. Spaces are ignored |
POST /api/auth/mfa/setup
Creates a new authenticator secret for the signed-in user and returns it with an otpauth URL and a QR code image as a data URL; MFA is on only after account_mfa_enable. While MFA is on it is refused with 409 MFA_ALREADY_ENABLED; turn MFA off first. Only a session token is accepted; personal API tokens are refused.
Changes data · Role: Any signed-in user · Not available through the MCP server
No inputs.
POST /api/auth/mfa/enable
Turns on MFA after checking a code from the authenticator set up with account_mfa_setup, and returns 10 single-use backup codes that are shown only this once. Refused when MFA is already on or the code is wrong. Only a session token is accepted; personal API tokens are refused.
Changes data · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
code (body) | string, required | A 6-digit code from the authenticator |
POST /api/auth/mfa/disable
Turns off MFA for the signed-in user and removes the authenticator secret and backup codes. It needs a current authenticator or backup code. Only a session token is accepted; personal API tokens are refused.
Changes data and can remove or overwrite it · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
code (body) | string, required | A current 6-digit authenticator code or a backup code. Spaces are ignored |
GET /api/auth/mfa/status
Returns enabled true when the signed-in user has MFA turned on. Only a session token is accepted; personal API tokens are refused.
Reads only · Role: Any signed-in user · Not available through the MCP server
No inputs.
GET /api/auth/tokens
Lists the personal API tokens of the caller, newest first, with name, prefix, access, last use, expiry and revocation time. The secret token is never returned.
Reads only · Role: Any signed-in user · Not available through the MCP server
No inputs.
POST /api/auth/tokens
Creates a personal API token that acts as the caller, and returns the secret token once; it cannot be shown again. Send it as Authorization: Bearer or in the X-API-Key header. A read-only token is refused everything that would change something.
Changes data · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
name (body) | string, required | The token name, up to 255 characters |
access (body) | one of full, read, optional | full (the default) for everything the caller's role allows, or read for endpoints that read only |
ideReadQueries (body) | boolean, optional | With access read, also run IDE queries in which every statement reads. Refused on a full-access token |
expiresInDays (body) | integer, 1 to 3650, optional | Days until the token expires, 1 to 3650. Leave it out for a token that does not expire |
DELETE /api/auth/tokens/:id
Revokes one of the caller's own tokens at once. Refused with 404 when the token is not the caller's or is already revoked.
Changes data and can remove or overwrite it · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
id (path) | string (uuid), required | The API token ID |
POST /api/onboarding/provision-user
Creates a user and returns a setup link, valid for 48 hours, where they choose a password; the link is also emailed unless notify is false or the email service is not set up, and emailed says whether it was. Refused when the email is already used or no seat is free. An administrator session token or the provisioning key in the X-Provision-Key header is accepted; personal API tokens are refused.
Changes data · Role: Admin · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
email (body) | string, required | The email address of the new user, a valid email address of up to 254 characters |
name (body) | string, required | The full name, up to 255 characters |
role (body) | one of admin, release_manager, approver, user, optional | The built-in role. Defaults to user |
notify (body) | boolean, optional | Send false to skip the welcome email |
GET /api/onboarding/approve
Opens a signed approval link: creates the account named in the link, emails the person a setup link when the email service is set up, and returns an HTML page. A link without a valid role creates an administrator; an expired or altered link is refused.
Changes data · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
token (query) | string, required | The signed approval token from the link |
POST /api/onboarding/resend-invite
Issues a new 48-hour setup link for a user who has not signed in yet, reactivating the account if it was deactivated, and emails it when the email service is set up. Refused with 404 when there is no pending invitation for the email. An administrator session token or the provisioning key is accepted.
Changes data · Role: Admin · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
email (body) | string, required | The email address of the invited user, a valid email address of up to 254 characters |
GET /api/auth/idp/saml/login
Redirects the browser to the SAML identity provider to sign in. Refused with 503 when SAML is not set up.
Reads only · Role: Any signed-in user · Not available through the MCP server
No inputs.
POST /api/auth/idp/saml/callback
Receives the identity provider response, creates the user on first sign-in with the role mapped from their groups, and redirects to the app with a session token. Failures, including no free seat, redirect to the sign-in page with an error.
Changes data · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
SAMLResponse (body) | string, optional | The signed SAML response the identity provider posts |
GET /api/auth/idp/oidc/login
Redirects the browser to the OpenID Connect provider and keeps the sign-in state for up to 10 minutes. Refused with 503 when OpenID Connect is not set up.
Changes data · Role: Any signed-in user · Not available through the MCP server
No inputs.
GET /api/auth/idp/oidc/callback
Exchanges the provider code for the user details, creates the user on first sign-in with the role mapped from their groups, and redirects to the app with a session token. An unknown or used state, or any failure, redirects to the sign-in page with an error.
Changes data · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
code (query) | string, required | The authorization code from the provider |
state (query) | string, required | The state given when sign-in started |
POST /api/auth/idp/ldap/login
Checks the username and password against the directory and returns the user and a session token, creating the user on first sign-in with the role mapped from their groups. Refused with 401 for wrong credentials or while LDAP is off, and 403 when the user has no seat.
Changes data · Role: Any signed-in user · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
username (body) | string, required | The directory username |
password (body) | string, required | The directory password |
GET /api/auth/idp/status
Reports whether SAML, OpenID Connect and LDAP sign-in are on, the OpenID Connect provider name, and whether password sign-in is open to everyone or only administrators. No sign-in is needed.
Reads only · Role: Any signed-in user · Not available through the MCP server
No inputs.
GET /api/auth/idp/config
Returns the saved single sign-on settings, or null when none are saved, with the client secret and LDAP bind password blanked out.
Reads only · Role: Admin · Not available through the MCP server
No inputs.
PUT /api/auth/idp/config
Replaces the saved single sign-on settings with the ones sent and returns them with secrets blanked out; a blank or missing client secret or bind password keeps the stored one. Providers that are turned on take effect at once.
Changes data · Role: Admin · Not available through the MCP server
| Input | Type | Description |
|---|---|---|
config (body) | object, optional | The whole single sign-on configuration. It can also be sent as the request body itself |
config.enableSSO (body) | boolean, optional | Turns single sign-on on. While it is off, no provider is used |
config.allowLocalAuth (body) | boolean, optional | Send false so that only administrators sign in with a password while a provider is on |
config.saml (body) | object, optional | SAML settings |
config.saml.enabled (body) | boolean, optional | Turns SAML sign-in on |
config.saml.entryPoint (body) | string, optional | The identity provider sign-in URL |
config.saml.issuer (body) | string, optional | The issuer (entity ID) of this service |
config.saml.cert (body) | string, optional | The identity provider signing certificate |
config.saml.callbackUrl (body) | string, optional | The URL the identity provider posts the response to |
config.saml.signatureAlgorithm (body) | one of sha1, sha256, sha512, optional | The signature algorithm |
config.saml.identifierFormat (body) | string, optional | The name ID format |
config.saml.wantAssertionsSigned (body) | boolean, optional | Require signed assertions |
config.saml.attributeMapping (body) | object, optional | Which attributes of the identity provider hold the user details |
config.saml.attributeMapping.email (body) | string, optional | The attribute that holds the email address |
config.saml.attributeMapping.name (body) | string, optional | The attribute that holds the display name |
config.oidc (body) | object, optional | OpenID Connect settings |
config.oidc.enabled (body) | boolean, optional | Turns OpenID Connect sign-in on |
config.oidc.provider (body) | string, optional | The provider name shown to users |
config.oidc.issuer (body) | string, optional | The issuer URL; /authorize, /token and /userinfo are added to it |
config.oidc.clientId (body) | string, optional | The client ID |
config.oidc.clientSecret (body) | string, optional | The client secret. Leave it blank to keep the stored one |
config.oidc.callbackUrl (body) | string, optional | The redirect URL registered with the provider |
config.oidc.scope (body) | list of string, optional | The scopes to request |
config.oidc.attributeMapping (body) | object, optional | Which attributes of the identity provider hold the user details |
config.oidc.attributeMapping.email (body) | string, optional | The attribute that holds the email address |
config.oidc.attributeMapping.name (body) | string, optional | The attribute that holds the display name |
config.ldap (body) | object, optional | LDAP settings |
config.ldap.enabled (body) | boolean, optional | Turns LDAP sign-in on |
config.ldap.url (body) | string, optional | The directory URL, such as ldaps://host:636 |
config.ldap.bindDN (body) | string, optional | The DN of the account used to search the directory |
config.ldap.bindCredentials (body) | string, optional | The password of that account. Leave it blank to keep the stored one |
config.ldap.searchBase (body) | string, optional | The DN to search for users under |
config.ldap.searchFilter (body) | string, optional | The search filter; {{username}} is replaced with the name the user enters |
config.ldap.tlsOptions (body) | object, optional | TLS options |
config.ldap.tlsOptions.rejectUnauthorized (body) | boolean, optional | Refuse directory certificates that are not trusted |
config.ldap.attributeMapping (body) | object, optional | Which attributes of the identity provider hold the user details |
config.ldap.attributeMapping.email (body) | string, optional | The attribute that holds the email address |
config.ldap.attributeMapping.name (body) | string, optional | The attribute that holds the display name |
config.roleMapping (body) | object, optional | Which identity provider groups give which role. Users in none of them get user |
config.roleMapping.adminGroups (body) | list of string, optional | Groups whose members are administrators |
config.roleMapping.approverGroups (body) | list of string, optional | Groups whose members are approvers |
config.roleMapping.releaseManagerGroups (body) | list of string, optional | Groups whose members are release managers |