Skip to Content
HomeLink Hub
Authentication

Request a password reset link or code

POST
/api/v1/auth/forgot-password

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.

Request Body

application/json
  1. body
email*string

Email address of the account.

Formatemail
isMobile?boolean

Send true from the mobile app to receive a 4-digit code instead of a link.

Response Body

  • Web request (link flow), whether or not the account exists
  • Mobile request (isMobile: true, code flow), whether or not the account exists
application/json
  1. response
status*integer
success*boolean
message*string
data*unknown
Example Request
curl -X POST 'http://localhost:4000/api/v1/auth/forgot-password' \  -H 'Content-Type: application/json' \  -d '{  "email": "adaeze.okonkwo@example.com",  "isMobile": false}'
Example Response
{  "status": 200,  "success": true,  "message": "If that email exists, a password reset link has been sent.",  "data": null}