TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/TheSerchCp/SEAM-API/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/v1/auth/register endpoint creates a new user account in the system. It validates the request body against registerSchema, hashes the provided password using bcrypt with 12 salt rounds, and stores the user record with the specified role. The response returns the created user object with the password field removed.
No authentication token is required to call this endpoint.
Endpoint
http://localhost:{PORT}/api/v1
Authentication: None required
Request Body
The user’s full display name. Must be between 2 and 100 characters.
The user’s email address. Must match the pattern
user@domain.tld. This value must be unique — the API returns 409 if the email is already registered.The user’s plain-text password. Must be between 6 and 100 characters. It is never stored or returned in plain text.
The numeric ID of an existing role to assign to this user (foreign key to the
roles table). Providing a non-existent roleId returns a 400 error due to a foreign key constraint violation (ER_NO_REFERENCED_ROW_2).The
password field is hashed with bcrypt using 12 salt rounds (SALT_ROUNDS = 12) before being written to the database. The hashed value is never included in any API response.Example Request
Responses
201 Created
Returned when the user is successfully registered. The response body contains the new user record with thepassword field omitted.
Always
true for successful responses.Human-readable confirmation message:
"Usuario registrado exitosamente".The newly created user record.
400 Bad Request — Validation Error
Returned when one or more required fields are missing, fail type checks, or violate length/pattern constraints (enforced byvalidate.middleware against registerSchema). Also returned when the provided roleId does not reference a valid role (MySQL ER_NO_REFERENCED_ROW_2 foreign key violation).
409 Conflict — Email Already Registered
Returned when the suppliedemail already exists in the users table. The service checks for a duplicate before inserting (ER_DUP_ENTRY).
Socket.IO Events
During registration the service emits real-time progress events on theauth:register channel. Clients connected to the Socket.IO server receive these in sequence:
| Order | Status | Payload message |
|---|---|---|
| 1 | start | "Iniciando registro de usuario..." |
| 2 | processing | "Verificando disponibilidad del correo..." |
| 3 | processing | "Procesando contraseña..." |
| 4 | processing | "Guardando usuario..." |
| 5 | success | "Usuario registrado exitosamente" |