The register endpoint creates a new user account in the system. Before creating the record, the server validates all required fields and checks that the email address is not already in use. Passwords are hashed with bcrypt before storage — never stored in plaintext.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/scoria02/marbes2021_backend/llms.txt
Use this file to discover all available pages before exploring further.
Request
Method:POSTPath:
/api/auth/registerAuthentication: None required
Content-Type:
application/json
Body parameters
A username for the new account. Must not be empty.
A valid email address. Must not already be registered in the system.
The account password. Must not be empty. Stored as a bcrypt hash (10 salt rounds).
Validation rules
The following rules are enforced by theRegisterValidationRules middleware before the request reaches the controller:
name— must be present and non-empty.email— must be present, non-empty, and a well-formed email address.password— must be present and non-empty.
400 response with a structured list of errors before any database operation occurs.
Response
201 — created
The newly created user record. The
password field is excluded from the response.Registration does not return a JWT token. After registering, call
POST /api/auth/login with the same credentials to obtain a token.Examples
Success response
201
Error responses
400
409
500