The register endpoint creates a new OpsMind user account. It accepts an email and password in the request body, runs them through Zod schema validation, checks that no account with the same email already exists, hashes the password with bcryptjs, and persists the new user via Prisma. On success it returns the newly created user’s database ID and email. No authentication token is required to call this endpoint.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LENINMORENO13/OpsMind/llms.txt
Use this file to discover all available pages before exploring further.
Endpoint
POST /api/v1/auth/register — No authentication required
Request Body
A valid email address for the new account. Validated by Zod with
z.string().email() — malformed addresses are rejected before the request reaches the controller.The account password. Must be at least 6 characters long. Validated by Zod with
z.string().min(6). The value is never stored in plain text — see the note below.Example Request
Success Response
HTTP 201 CreatedAlways
true on a successful registration.Human-readable confirmation —
"User created successfully".Contains the new user record summary.
Error Responses
| HTTP Status | Cause |
|---|---|
400 | An account with the supplied email is already in the database, or the request body failed Zod schema validation. |
500 | An unexpected server-side error occurred (e.g. database unavailable). |
Passwords are never stored in plain text. Before the user record is written to the database, the password is hashed using bcryptjs with a freshly generated salt at 10 rounds (
bcrypt.genSalt(10)). Only the resulting hash is persisted, so even a full database leak does not expose raw passwords.