Creates a new user account. This endpoint requires admin permissions.
Admin Only: Only users with admin roles (DIRECTOR, GERENTE) can create users.
If no password is provided, the default password icl2026 will be set. Passwords are automatically hashed using bcrypt.
Request Body
User’s email address (must be unique)
User role: DIRECTOR, GERENTE, COMERCIAL, CSV, OPERACIONES, or ADMINISTRACION
User’s password (will be hashed)
Whether the user account is active
User’s national ID number
curl -X POST https://api.iclcotizaciones.com/api/usuarios \
-H "Cookie: session=your_session_token" \
-H "Content-Type: application/json" \
-d '{
"full_name": "Carlos Rodríguez",
"email": "[email protected]",
"role": "COMERCIAL",
"password": "SecurePass123!",
"is_active": true,
"dni": "11223344"
}'
{
"id": 8,
"full_name": "Carlos Rodríguez",
"email": "[email protected]",
"role": "COMERCIAL",
"is_active": true
}