curl --request POST \
--url https://api.example.com/api/auth/register \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"password": "<string>",
"name": "<string>",
"accountName": "<string>",
"skipDefaultAccount": true,
"encryptedAccountKey": "<string>",
"verificationBlob": "<string>"
}
'{
"success": true,
"message": "<string>",
"emailVerified": true,
"user": {
"id": "<string>",
"email": "<string>",
"name": "<string>",
"created_at": "<string>"
},
"key_salt": "<string>",
"accountId": {}
}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>",
"name": "<string>",
"accountName": "<string>",
"skipDefaultAccount": true,
"encryptedAccountKey": "<string>",
"verificationBlob": "<string>"
}
'{
"success": true,
"message": "<string>",
"emailVerified": true,
"user": {
"id": "<string>",
"email": "<string>",
"name": "<string>",
"created_at": "<string>"
},
"key_salt": "<string>",
"accountId": {}
}Creates a new user account with email, password, and name. Sends a verification email to the provided email address. Users must verify their email before they can log in.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/bpstack/home-account-showcase/llms.txt
Use this file to discover all available pages before exploring further.
true, skips creation of the default account. Default is false.true for successful registration.false for new registrations. User must verify email.skipDefaultAccount was true.curl -X POST https://api.homeaccount.app/api/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "newuser@example.com",
"password": "SecurePass123!",
"name": "Jane Smith",
"accountName": "Personal Account"
}'
{
"success": true,
"message": "Cuenta creada. Revisa tu email para verificar tu cuenta.",
"emailVerified": false,
"user": {
"id": "usr_2b3c4d5e6f7g",
"email": "newuser@example.com",
"name": "Jane Smith",
"created_at": "2024-03-05T15:30:00.000Z"
},
"key_salt": "b2c3d4e5f6g7890...",
"accountId": "acc_1x2y3z4w5v6u"
}
{
"success": false,
"error": "La contraseña debe tener al menos 6 caracteres"
}
"El email es requerido""Por favor ingresa un email válido""La contraseña debe tener al menos 6 caracteres""La contraseña debe contener al menos un número""La contraseña debe contener al menos un carácter especial""El nombre es requerido""El nombre solo puede contener letras y espacios""El nombre no puede tener más de 100 caracteres""El nombre de la cuenta es muy largo"{
"success": false,
"error": "Email already registered"
}
email_verified: falsekey_salt and accountId to allow the frontend to:
registerRateLimiter and emailRateLimiter middlewareSALT_ROUNDSregisterSchema) for type-safe validationskipDefaultAccount: true| Feature | Register | Login |
|---|---|---|
| Email Verification Required | Creates unverified account | Must be verified to proceed |
| Returns Session Tokens | No | Yes (as httpOnly cookies) |
Returns key_salt | Yes | Yes |
| Returns CSRF Token | No | Yes |
| Creates Default Account | Yes (optional) | No |
key_saltGET /api/auth/verify-emailbackend/controllers/auth/auth-controller.ts:49
Route: backend/routes/auth/auth-routes.ts:46
Validator: backend/validators/auth-validators.ts:8