Update Account Password
This API endpoint allows you to change your current password. You must provide your previous_password and the new proposed_password you wish to set.

Authorization: Bearer YOUR_TOKEN



Expected Behavior:


  • On success, the system will update the password and return a confirmation message.
  • If the request is unauthorized or invalid, the system will respond with an error message.
Request Body Parameters
  • previous_password string
    The current password of the user.
  • proposed_password string
JavaScript
Response codes
const axios = require('axios');

const url = 'https://auth.api.pinghome.io/v1/account/password';
const requestBody = {
    previous_password: 'UpdatedPassw0rd!',
    proposed_password: 'TestPassw0rd!'
};

axios.put(url, requestBody, {
    headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
    }
})
.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).