Recover Password
This endpoint is used to complete the password recovery process by verifying the confirmation code and setting a new password. After initiating a password reset, you will receive a confirmation code by email. To reset your password, submit your email, the confirmation code, and your new password.

Use this after you've received a password reset code via email and are ready to set a new password for your account.

How it works:
1️⃣ Provide required details – Submit your email, the code you received, and a new password.
2️⃣ Verification – The system checks the code and validates the input.
3️⃣ Password updated – If successful, your password will be changed and you can log in with the new credentials.

When to use:
Use this when you forget your password and need to reset it to regain access to your account.

How it works:
1️⃣ Enter your email – Submit the email address you used to sign up.
2️⃣ Get a confirmation code – The system will send a password reset code to your inbox.
3️⃣ Proceed to reset – Use the Confirm Password Recovery endpoint to enter the code and set a new password.

Expected Behavior:


  • On success, you will receive an email containing a confirmation code to reset your password.
  • Use the Confirm Password Recovery endpoint to verify the confirmation code you received via email.
  • If the email address is invalid or the request fails, an error message will be returned explaining the issue.
Request Body Parameters
  • email string
    The email address of the user requesting password recovery.
JavaScript
Response codes
const axios = require('axios');

const url = 'https://auth.api.pinghome.io/v1/account/password';
const requestBody = {
    email: 'pinghome@gmail.com'
};

axios.post(url, requestBody)
.then(response => {
    console.log(response.data);
})
.catch(error => {
    console.error(error);
});
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).