TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Gianluca-X/DigitalMoney/llms.txt
Use this file to discover all available pages before exploring further.
/auth/register endpoint creates a new user record in the auth service’s database, BCrypt-hashes the provided password, assigns a role, and immediately dispatches an email containing a UUID verification code. A JWT is generated and returned alongside the new user’s internal auth ID, but the account cannot be used to log in until the verification step is completed.
Endpoint
application/json
This endpoint is typically called indirectly through
POST /users/register on the user-service, which orchestrates auth-service registration, user-service profile creation, and account provisioning in a single flow. Call /auth/register directly only when you need to create an auth record in isolation.Request Body
The user’s email address. Must be unique across the auth database — the
email column carries a UNIQUE constraint, so submitting a duplicate address causes a database constraint violation.Plain-text password for the account. The service encodes it with BCrypt before persisting.
The role to assign to the new user. Accepted values:
USER, ADMIN. Defaults to USER when omitted.Response Fields
A successful200 OK response returns an AuthResponse object.
A signed HS256 JWT whose subject is the user’s email address and whose
role claim carries the assigned role. The token is valid for 24 hours (86 400 000 ms). Although returned immediately, callers should treat this token as inactive until the email is verified — the login endpoint enforces the emailVerified flag.The auto-generated primary key of the newly created
User record in the auth database (auth_db). This ID is propagated to the user-service during orchestrated registration.A human-readable status message. Returns
null on this endpoint — the message field is populated more consistently on login.Example
Request
Response 200 OK
Error Codes
| HTTP Status | Exception | Description |
|---|---|---|
400 Bad Request | InvalidPasswordException | The supplied password does not meet the service’s validation requirements. |
500 Internal Server Error | Exception | An unexpected server-side error occurred. This also covers duplicate-email submissions — the auth service does not pre-validate uniqueness, so a DB constraint violation surfaces as a 500 from this endpoint. To guard against duplicate emails, use POST /users/register, which checks uniqueness before forwarding to the auth service. |
