Skip to Content
🎉 New release with new features and improvements! V0.0.6 Release →

Authentication API

The Authentication API provides endpoints for user authentication, token management, and password operations.

Base Endpoint

/api/auth

Endpoints

MethodEndpointDescription
POST/api/auth/registerRegister new user
POST/api/auth/activate-accountActivate user account using verification code
POST/api/auth/loginAuthenticate user with email and password
POST/api/auth/refreshRefresh expired access token
POST/api/auth/forget-passwordRequest password reset code via email
POST/api/auth/reset-passwordReset password using verification code
POST/api/auth/resend-activation-emailResend activation email to the user

Token usage

Choose one primary style per client. You can mix API keys and JWT in different apps, but a single request should use one method.

Send the access token on each request:

Authorization: Bearer {{accessToken}}

Silent refresh (header clients): also send the refresh token so the engine can renew an expired access token without a separate refresh call:

X-BSH-REFRESHTOKEN: {{refreshToken}}

When refresh happens during the request, the JSON body may include the new access token at meta.accessToken. See Refresh Token.

If both Authorization: Bearer … and cookie session cookies are present, header auth takes precedence for that request.

If a JWT session is already established, API key authentication on the same request does not override it.

Authentication Flow