POST /api/register/init
Initiates user registration by sending a 6-digit OTP to the provided email address. The OTP expires in 10 minutes.Request Body
User’s full name
Valid email address (will be normalized)Validation: Must be a valid email format
User passwordValidation Rules:
- Minimum 8 characters
- At least one uppercase letter
- At least one lowercase letter
- At least one number
- At least one special character (@$!%*?&)
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$Response
Success or error message
Status Codes
200- OTP sent successfully400- Validation error (invalid email format, weak password, etc.)409- Account already exists with this email OR user already initiated registration (pending OTP verification)500- Failed to send OTP
Example Request
Example Response
Error Responses
POST /api/register/verify
Completes user registration by verifying the OTP sent to the email address. Creates the user account and subscription upon successful verification.Request Body
Email address used during registration initializationValidation: Must be a valid email format
6-digit numeric OTP code received via emailValidation:
- Must be exactly 6 characters
- Must be numeric only
Response
Success or error message
Status Codes
201- User registered successfully400- Validation error or invalid/expired OTP404- Registration not initiated for this email500- Internal server error
Example Request
Example Response
Error Responses
Notes
- OTP codes expire after 10 minutes
- After successful verification, a welcome email is queued for delivery
- A subscription record is automatically created for the new user
- Temporary user data is removed after successful verification