curl --request POST \
--url https://api.example.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"fullName": "<string>",
"email": "<string>",
"password": "<string>"
}
'{
"success": true,
"message": "<string>",
"data": {
"token": "<string>"
},
"timestamp": "<string>"
}Create a new user account and receive an authentication token
curl --request POST \
--url https://api.example.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"fullName": "<string>",
"email": "<string>",
"password": "<string>"
}
'{
"success": true,
"message": "<string>",
"data": {
"token": "<string>"
},
"timestamp": "<string>"
}POST /api/auth/register
curl -X POST https://api.portfoliohub.com/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"fullName": "John Doe",
"email": "[email protected]",
"password": "securePassword123"
}'
{
"success": true,
"message": "Usuario registrado exitosamente",
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
},
"timestamp": "2026-03-09T14:30:00.123Z"
}
{
"success": false,
"message": "Error de validación",
"data": {
"email": "must be a well-formed email address",
"password": "size must be between 8 and 100",
"fullName": "must not be blank"
},
"timestamp": "2026-03-09T14:30:00.123Z"
}
{
"success": false,
"message": "Email already registered",
"data": null,
"timestamp": "2026-03-09T14:30:00.123Z"
}
| Status Code | Description |
|---|---|
| 200 | User successfully registered and token generated |
| 400 | Invalid request body or validation errors |
| 409 | Email address already exists in the system |
| 500 | Internal server error |