Change password REST API
POST
/api/user/password
const url = 'https://hitkeep.com/api/user/password';const options = { method: 'POST', headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'}, body: '{"current_password":"example","new_password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://hitkeep.com/api/user/password \ --header 'Content-Type: application/json' \ --cookie hk_token=<hk_token> \ --data '{ "current_password": "example", "new_password": "example" }'Changes password for authenticated user and keeps password login enabled for that account.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
current_password
required
string
new_password
required
string
Examplegenerated
{ "current_password": "example", "new_password": "example"}Responses
Section titled “Responses”Status
Media typeapplication/json
object
message
string
status
string
Examplegenerated
{ "message": "example", "status": "example"}Current password is incorrect
Media typeapplication/json
object
message
string
Examplegenerated
{ "message": "example"}