curl --request POST \
--url https://api.example.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"password": "<string>"
}
'{
"success": true,
"message": "<string>",
"data": {
"user": {
"_id": "<string>",
"name": "<string>",
"email": "<string>",
"role": "<string>",
"isActive": true,
"createdAt": "<string>",
"updatedAt": "<string>"
},
"token": "<string>"
}
}Create a new user account
curl --request POST \
--url https://api.example.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"password": "<string>"
}
'{
"success": true,
"message": "<string>",
"data": {
"user": {
"_id": "<string>",
"name": "<string>",
"email": "<string>",
"role": "<string>",
"isActive": true,
"createdAt": "<string>",
"updatedAt": "<string>"
},
"token": "<string>"
}
}{
"success": false,
"message": "El email ya está registrado"
}
{
"success": false,
"message": "Validation failed",
"errors": [
{
"field": "password",
"message": "La contraseña debe contener al menos una letra y un número"
}
]
}
{
"success": false,
"message": "Demasiados intentos de autenticación. Intenta en 15 minutos.",
"retryAfter": 900
}
curl -X POST https://api.cuido.com/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"name": "Juan Pérez",
"email": "[email protected]",
"password": "SecurePass123"
}'
{
"success": true,
"message": "Usuario registrado exitosamente",
"data": {
"user": {
"_id": "507f1f77bcf86cd799439011",
"name": "Juan Pérez",
"email": "[email protected]",
"role": "user",
"isActive": true,
"createdAt": "2026-03-05T10:30:00.000Z",
"updatedAt": "2026-03-05T10:30:00.000Z"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI1MDdmMWY3N2JjZjg2Y2Q3OTk0MzkwMTEiLCJ0aW1lc3RhbXAiOjE3MDk2MzU4MDAwMDAsImlhdCI6MTcwOTYzNTgwMCwiZXhwIjoxNzEwMjQwNjAwLCJpc3MiOiJjbGF1ZGUtcHJvbXB0LWFwaSIsInN1YiI6IjUwN2YxZjc3YmNmODZjZDc5OTQzOTAxMSJ9.abc123xyz"
}
}