curl --request POST \
--url https://api.example.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"confirmPassword": "<string>",
"firstName": "<string>",
"lastName": "<string>"
}
'{
"success": true,
"data": {
"message": "<string>"
},
"error": "<string>",
"details": {}
}Create a new user account
curl --request POST \
--url https://api.example.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"confirmPassword": "<string>",
"firstName": "<string>",
"lastName": "<string>"
}
'{
"success": true,
"data": {
"message": "<string>"
},
"error": "<string>",
"details": {}
}password field exactly.true for successful requests.false for error responses.| Status Code | Error Message | Description |
|---|---|---|
| 400 | Datos inválidos | Request body validation failed. Check details for specific field errors. |
| 409 | El email ya existe | An account with this email address already exists. |
details object contains field-specific validation errors:
{
"success": false,
"error": "Datos inválidos",
"details": {
"fieldErrors": {
"password": ["Debe contener al menos una mayúscula"],
"confirmPassword": ["Las contraseñas no coinciden"]
}
}
}
PENDING_VERIFICATIONPENDING_VERIFICATIONACTIVEcurl -X POST https://your-domain.com/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "SecurePass123",
"confirmPassword": "SecurePass123",
"firstName": "John",
"lastName": "Doe"
}'
passwordSchema):
SecurePass123MyP@ssw0rdWelcome2024password (no uppercase, no number)PASSWORD123 (no lowercase)Pass123 (too short)SecurePass (no number)