Create an account with email and password
Access: Public, no token needed.
Creates an unverified account and emails a verification message (subject "Verify your HomeLink Hub account"). Web sign-ups receive a link to /auth/verify-email?token=... on the frontend that matches the role (the client app for AGENT, LANDLORD, LAWYER and DEVELOPER, the consumer site otherwise); the link token is a JWT that lives as long as an access token (JWT_ACCESS_EXPIRY, 15 minutes by default, so production should set a longer value). When isMobile is true a 4-digit code valid for 15 minutes is sent instead, to be submitted to POST /auth/verify-email-otp.
role defaults to TENANT; ADMIN cannot be chosen. LANDLORD and AGENT accounts are created with a KYC record in PENDING status. The password is stored as a bcrypt hash. The email is sent after the response and a delivery failure is only logged, so a 201 does not guarantee the email arrived: use POST /auth/resend-verification if it does not. No tokens are returned; the user must verify the email and then sign in.
application/json- body
firstName*stringGiven name, 2-50 characters (trimmed).
2 <= length <= 50lastName*stringFamily name, 2-50 characters (trimmed).
2 <= length <= 50email*stringEmail address. Lower-cased and trimmed before it is stored; must be unique.
emailpassword*stringPassword, 8-128 characters.
8 <= length <= 128phone?stringOptional phone number. Digits, +, -, spaces and parentheses only.
^[\d+\-\s()]+$role?stringAccount type: TENANT (default), LANDLORD, AGENT, LAWYER or DEVELOPER.
"TENANT""LANDLORD""AGENT""LAWYER""DEVELOPER"isMobile?booleanSend true from the mobile app to receive a 4-digit verification code instead of a link.
- Account created; verification link emailed (web)
- Account created; 4-digit verification code emailed (
isMobile: true)
application/json- response
status*integersuccess*booleanmessage*stringdata*curl -X POST 'http://localhost:4000/api/v1/auth/signup' \ -H 'Content-Type: application/json' \ -d '{ "firstName": "Adaeze", "lastName": "Okonkwo", "email": "adaeze.okonkwo@example.com", "password": "S3cure-Passw0rd", "phone": "+2348031234567", "role": "AGENT", "isMobile": false}'{ "status": 201, "success": true, "message": "Account created successfully. Please check your email to verify your account.", "data": { "firstName": "Adaeze", "lastName": "Okonkwo", "email": "adaeze.okonkwo@example.com", "role": "AGENT", "isEmailVerified": false }}
HomeLink Hub