POST /api/auth/register
Creates a new user account and sends a verification email. The registration process validates role-specific requirements and creates associated resources (e.g., stores for store employees).Request body
User’s full name (minimum 2 characters)
User’s email address. Students and faculty must use a
christuniversity.in email (subdomains allowed)Password must meet the following requirements:
- Minimum 8 characters
- At least one uppercase letter
- At least one lowercase letter
- At least one digit
Must match the password field
User role. Must be one of:
student, faculty, or store_employeeStudent registration number. Required when role is
studentEmployee identification number. Required when role is
faculty or store_employeeIndian mobile number (10 digits starting with 6-9). Required when role is
store_employeeName of the store. Required when role is
store_employeeStore UPI ID for payments (format:
username@provider). Required when role is store_employeeResponse
Indicates if the registration was successful
Human-readable response message
The created user object (sanitized)
Status codes
201- Registration successful, verification email sent400- Invalid request data or email domain mismatch409- Email already registered500- Internal server error
After registration, users must verify their email before logging in. A verification email is sent automatically with a unique token.