Complete API endpoint documentation
Base URL: /api
/api/auth/loginUser login with email/national ID and password. Supports biometric login. Returns JWT tokens, user data, accessible tenants, current tenant, app version, and Google Maps API key.
/api/auth/loginRefresh access token using a refresh token. Returns new access and refresh tokens.
/api/auth/loginSwitch active tenant for a user. Requires authentication and validates user has access to target tenant.
/api/auth/loginLogout user. Invalidates the current access token and clears session.
/api/auth/forgot-passwordReset user password without authentication. Requires national ID, email, phone, and new password for verification. This is a password reset endpoint, not a password change endpoint.
/api/auth/change-passwordNot ImplementedChange password for authenticated user. Requires current password and new password. User must be logged in.
/api/auth/change-emailNot ImplementedChange email address for authenticated user. Requires current password and new email address. May require email verification.
/api/auth/verify-emailNot ImplementedVerify email address using verification token sent to user's email. Required after email change or registration.
/api/auth/resend-verificationNot ImplementedResend email verification token to user's email address. Useful if verification email was not received.