Register a new user account with customer role
cURL
curl --request POST \ --url https://api.example.com/auth/register \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "email": "<string>", "password": "<string>" } '
{ "message": "<string>", "user": { "user.id": 123, "user.name": "<string>", "user.email": "<string>", "user.role": "<string>", "user.createdAt": "<string>" } }
customer
{ "name": "John Doe", "email": "[email protected]", "password": "securePassword123" }
{ "message": "Usuario registrado exitosamente", "user": { "id": 1, "name": "John Doe", "email": "[email protected]", "role": "customer", "createdAt": "2026-03-06T10:30:00.000Z" } }
{ "error": "El email ya está en uso" }
{ "error": "Validation failed", "details": [ "La contraseña debe tener al menos 6 caracteres" ] }
{ "error": "Demasiados intentos. Intenta de nuevo en 15 minutos." }