Authentication

User registration, login, OTP, password reset and token management

Register a new user

post
/auth/register

Creates a new user account. No authentication required. For Manager role, a company is created automatically. For Association, an association is created. 2FA is auto-enabled for Manager, SuperManager, Cashier and Observer.

Query parameters
langstring · enumOptional

Language for the verification email

Possible values:
Body
emailstring · emailRequired
passwordstringRequired

Must match password complexity requirements (uppercase, lowercase, digit, special char)

firstNamestringRequired
lastNamestringRequired
rolestring · enumRequired

User role — determines company/association creation

Possible values:
companyNamestringOptional

Required for Manager and Cashier roles

associationNamestringOptional

Required for Association role

originstringOptional
phoneNumberstringOptional
phoneNumberCountrystringOptional

ISO country code, e.g. FR

Responses
200

User registered successfully.

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

post
/auth/register

Login (Manager / SuperManager)

post
/auth/login/manager

Authenticates a merchant manager, super manager, cashier, observer or association user. If 2FA is enabled, an otpValidationToken cookie is set and the final access token is only returned after calling /auth/otp. The origin field must be dashboard for the backoffice or application for the mobile app.

Body
emailstring · emailRequired
passwordstringRequired
originstring · enumRequired

Login origin — 'dashboard' for backoffice, 'application' for mobile app

Possible values:
Responses
200

Login successful. If 2FA is enabled, token is null and an otpValidationToken cookie is set. Call /auth/otp to complete authentication.

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

post
/auth/login/manager

Validate 2FA OTP

post
/auth/otp

Validates a TOTP code (authenticator app) or email OTP after login when 2FA is enabled. The otpValidationToken cookie (set by /auth/login/manager) must be present. Returns the final JWT access token on success.

Roles: Manager, SuperManager, SuperAdmin, Cashier, Observer

Authorizations
AuthorizationstringRequired

JWT token obtained from /auth/login or /auth/login/manager. Include as Authorization: Bearer <token>.

Body
otpstringOptional

6-digit TOTP code from authenticator app

emailOtpstringOptional

6-digit OTP received by email

Responses
200

OTP validated — final JWT access token returned

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

post
/auth/otp

Send email OTP

post
/auth/otp/email

Sends a one-time passcode to the provided email address. Used during 2FA login when the user prefers email OTP over authenticator app.

Body
emailstring · emailRequired
Responses
200

OTP sent successfully

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

dataanyOptional

Response payload

post
/auth/otp/email

Send password reset email

post
/auth/reset-password/send

Sends a password reset link to the provided email address. SuperAdmin accounts are excluded.

Query parameters
langstring · enumOptional

Language for the reset email

Possible values:
Body
emailstring · emailRequired
originstringOptional

If 'application', returns the reset token directly instead of sending an email

Responses
200

Reset email sent (or token returned if origin=application)

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

dataanyOptional

Response payload

post
/auth/reset-password/send

Change forgotten password

post
/auth/reset-password/change

Sets a new password using the token received in the reset email. Sends a notification email after the change.

Body
tokenstringRequired

Token from the password reset email

newPasswordstringRequired

New password (must match complexity requirements)

Responses
200

Password changed successfully

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

dataanyOptional

Response payload

post
/auth/reset-password/change

Refresh access token

post
/auth/refresh-token

Issues a new JWT access token using the refresh token stored in an httpOnly cookie. For backoffice users, pass the user ID via the x-user-id header so the correct cookie is read.

Header parameters
x-user-idstringOptional

User ID (backoffice sessions only) — determines the refresh token cookie name

Responses
200

New access token issued

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

post
/auth/refresh-token

Sign out

post
/auth/sign-out

Clears the refresh token cookie, effectively ending the session. Pass the x-user-id header for backoffice sessions.

Header parameters
x-user-idstringOptional

User ID (backoffice sessions only)

Responses
200

Signed out successfully

application/json
successbooleanOptional

Whether the request succeeded

statusintegerOptional

HTTP status code

post
/auth/sign-out
200

Signed out successfully

Last updated