Skip to main content
POST
/
api
/
usuarios
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
}
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

full_name
string
required
User’s full name
email
string
required
User’s email address (must be unique)
role
string
required
User role: DIRECTOR, GERENTE, COMERCIAL, CSV, OPERACIONES, or ADMINISTRACION
password
string
default:"icl2026"
User’s password (will be hashed)
is_active
boolean
default:true
Whether the user account is active
dni
string
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
}

Build docs developers (and LLMs) love