Forgot Password

This API enables you to send a password reset email to the user based on the EmailAddress (registered email address) posted in the JSON body.

Alternatively, you can pass the “SearchKeyData” property and include the “SchemaName” and “Value” of any unique lead field. A password reset email will be sent to the email address associated with the lead that matches the “SearchKeyData”.

{
"SearchKeyData":{
"SchemaName":"Phone",
"Value":"+14-157415569"
}
}

If you want to send the password reset link to a phone or an alternative email, along with the “SearchKeyData”, also pass the “RecipientField” property and include the “SchemaName” of the field you want to send the link to. The field must be of data type phone or email.

{
"SearchKeyData":{
"SchemaName":"Phone",
"Value":"+14-157415569"
},
"RecipientField":{
"SchemaName":"Phone"
}
}
  • The API response returns a LeadId and a TemporaryPassword
  • Both the LeadId and TemporaryPassword must be passed in the Reset Password API to create a new password

Note: You must pass the public authentication key you receive from the Get Public Auth Key API response. It must be passed in the API header as Authorization = <Your Auth Key>

Here’s an example of the forgot password functionality in a sample portal. When users enter their email address, an email is sent with a reset password link.

forgot password api

 

API URL

POST
https://{host}/api/Authentication/SecureForgotPassword?
Copy URL

Request

JSON Body/Payload

Content-Type: application/json

{
  "EmailAddress": "johnwick@example.com"
}

JSON Properties

Parameter Description
EmailAddress

Pass the user’s registered email address.

Response

200 OK

Content-Type: application/json

{
   "Status":"Success",
   "Message":"Reset link sent successfully"
}

HTTP Response Code

Code Description
200 OK

This is the status code for successful API call.

401 Unauthorized

The API call was made with invalid access credentials. Check your AccessKey and SecretKey.

400 Bad Request

The message body on the request is not as per API specification. Make sure that content type is set to “application/json” and the JSON body has correct attribute names and structure.

404 Not Found

The API could not be found. Please check the API signature.

429 Too Many Requests

API calls exceeded the limit of 25 in 5 second(s)

500 Internal Server Error

The API called failed. There could be many reasons for it. Check the exception message to get more details.