curl --request POST \
--url https://api.example.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"currency": "<string>"
}
'{
"user": {
"id": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"currency": "<string>",
"role": "<string>",
"avatarUrl": {}
},
"token": "<string>",
"409 Conflict": {},
"400 Bad Request": {}
}Create a new user account with email and password
curl --request POST \
--url https://api.example.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"currency": "<string>"
}
'{
"user": {
"id": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"currency": "<string>",
"role": "<string>",
"avatarUrl": {}
},
"token": "<string>",
"409 Conflict": {},
"400 Bad Request": {}
}Show user properties
curl -X POST https://api.yourfinanceapp.com/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"password": "SecurePass123!",
"firstName": "John",
"lastName": "Doe",
"currency": "USD"
}'
{
"user": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"currency": "USD",
"role": "USER",
"avatarUrl": null
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI1NTBlODQwMC1lMjliLTQxZDQtYTcxNi00NDY2NTU0NDAwMDAiLCJlbWFpbCI6ImpvaG4uZG9lQGV4YW1wbGUuY29tIiwicm9sZSI6IlVTRVIiLCJpYXQiOjE3MDk1NjE2MDB9.abc123def456"
}
{
"statusCode": 409,
"message": "El email ya está registrado",
"error": "Conflict"
}
{
"statusCode": 400,
"message": [
"email must be an email",
"La contraseña debe tener al menos 8 caracteres",
"firstName must be longer than or equal to 2 characters"
],
"error": "Bad Request"
}
LOCALUSER role