Request a password reset link or code
Access: Public, no token needed.
Starts a password reset. Always answers 200, whether or not the email belongs to an account, to prevent email enumeration. For an existing account it emails (subject "Reset your HomeLink Hub password") either a link to /auth/reset-password?token=... on the frontend matching the user's role (the client app for AGENT, LANDLORD, LAWYER and DEVELOPER, the consumer site otherwise) or, when isMobile is true, a 4-digit code valid for 15 minutes. The link token is a JWT that lives as long as an access token (7 days unless configured otherwise). Each request replaces the previously issued token or code. Unlike sign-up, the email is sent before the response, so a mail-server failure surfaces as a 500.
application/json- body
email*stringEmail address of the account.
emailisMobile?booleanSend true from the mobile app to receive a 4-digit code instead of a link.
- Web request (link flow), whether or not the account exists
- Mobile request (
isMobile: true, code flow), whether or not the account exists
application/json- response
status*integersuccess*booleanmessage*stringdata*unknowncurl -X POST 'http://localhost:4000/api/v1/auth/forgot-password' \ -H 'Content-Type: application/json' \ -d '{ "email": "adaeze.okonkwo@example.com", "isMobile": false}'{ "status": 200, "success": true, "message": "If that email exists, a password reset link has been sent.", "data": null}