Skip to main content
POST
/
intern
/
signup
curl -X POST https://api.demet.com/intern/signup \
  -H "Content-Type: application/json" \
  -b "access_token=your_access_token" \
  -d '{
    "name": "Juan Pérez",
    "email": "[email protected]",
    "password": "123456",
    "rol": "Administrador"
  }'
{
  "mensaje": "Registro Exitoso"
}

Authentication

This endpoint requires authentication with the Administrador role. The access token must be provided in cookies.

Request Body

name
string
required
Employee’s full name. Must be at least 3 characters long.
email
string
required
Employee’s email address. Must be a valid email format.
password
string
required
Employee’s password. Must be at least 6 characters long. Will be securely hashed before storage.
rol
string
required
Employee’s role in the system.Allowed values:
  • Administrador - Full administrative access
  • Asistente de Gerencia - Management assistant access

Response

mensaje
string
Success message confirming the registration
curl -X POST https://api.demet.com/intern/signup \
  -H "Content-Type: application/json" \
  -b "access_token=your_access_token" \
  -d '{
    "name": "Juan Pérez",
    "email": "[email protected]",
    "password": "123456",
    "rol": "Administrador"
  }'
{
  "mensaje": "Registro Exitoso"
}

Validation Rules

The request body is validated against the following schema:

Security Notes

  • Passwords are automatically hashed using bcrypt before storage
  • Only users with Administrador role can register new employees
  • Email addresses must be unique in the system
  • The endpoint validates the access token via the verifyRol middleware

Build docs developers (and LLMs) love