Register User
Register a new user account. An OTP will be sent to the provided email for verification.
Endpoint
Authentication
Not required (public endpoint)
Request Body
{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+994501234567",
"password": "SecurePass123!",
"confirm_password": "SecurePass123!",
"preferred_language": "az"
}
Parameters
| Field | Type | Required | Description | Validation |
|---|---|---|---|---|
first_name |
string | Yes | User's first name | Not empty |
last_name |
string | Yes | User's last name | Not empty |
email |
string | Yes | User's email address | Valid email format |
phone |
string | Yes | User's phone number | Valid phone format |
password |
string | Yes | User's password | Min 8 chars, uppercase, lowercase, number, symbol |
confirm_password |
string | Yes | Password confirmation | Must match password |
preferred_language |
string | Yes | Preferred language code | One of: "az", "en", "es", "de" |
Response
Success (200 OK)
An OTP code is sent to the provided email address. The user must verify the OTP using the Check OTP User endpoint.
Error Responses
Email Already Exists (404)
Password Mismatch (400)
Validation Errors (400)
or
or
Example Request
curl -X POST "https://api.luxmart.site/v1/accounts/register/user/" \
-H "Content-Type: application/json" \
-d '{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+994501234567",
"password": "SecurePass123!",
"confirm_password": "SecurePass123!",
"preferred_language": "az"
}'
Notes
- The user account is created with
is_active: falseuntil OTP verification - OTP is sent asynchronously via email
- Password is hashed before storage
- User role is automatically set to "1" (User)