Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LizandroCanul/back_sdo/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Create a new user account in the system. The password is automatically encrypted using bcrypt with 10 salt rounds. New users are created withmustChangePassword: true by default.
Authentication
Requires a valid JWT token with admin role.Request Body
User’s full name. Minimum 3 characters.
User’s email address. Must be a valid email format and unique in the system.
User’s password. Minimum 6 characters. Will be encrypted with bcrypt before storage.
User role. Must be either
admin or user.Whether the user account should be active immediately.
Response
Returns the created user object (password field is excluded).Unique identifier for the newly created user
User’s email address
User’s full name
Assigned role:
admin or userAccount active status
Always
true for newly created usersTimestamp when the user was created
Timestamp when the user was last updated
Example Request
cURL
Example Response
201 Created
400 Bad Request - Duplicate Email
400 Bad Request - Validation Error
403 Forbidden
Validation Rules
- nombreCompleto: Minimum 3 characters
- email: Must be valid email format and unique in database
- password: Minimum 6 characters (encrypted with bcrypt)
- roles: Must be either
adminoruser(if provided) - isActive: Must be boolean (if provided)
Security Notes
- Passwords are hashed using bcrypt with 10 salt rounds before storage
- Password field is never returned in API responses
- All new users are created with
mustChangePassword: true - Database constraint prevents duplicate email addresses (error code 23505)