Change the signed-in member's password
POST
/account/change-password
const url = 'https://acme.mykreezalid.com/front_api/v1/account/change-password';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"current_password":"example","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://acme.mykreezalid.com/front_api/v1/account/change-password \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "current_password": "example", "password": "example" }'Replaces the signed-in member’s password with the one you send, once current_password matches the password in force. The access tokens issued before are revoked, and the member is signed out of the storefront.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
current_password
required
The password in force.
string format: password
password
required
The new password.
string format: password
Example generated
{ "current_password": "example", "password": "example"}Responses
Section titled “Responses”The password is changed.
Media typeapplication/json
object
code
integer
status
string
message
string
Example
{ "code": 200, "status": "success", "message": "Password has successfully been updated"}password not provided in body when password or current_password is missing or empty.
Media typeapplication/json
object
code
integer
success
boolean
message
string
Example
{ "code": 401, "success": false, "message": "password not provided in body"}No valid access token was sent, current_password does not match (Current password is incorrect), or the new password was refused (You cannot access this resource).
Media typeapplication/json
Error body returned by the Front API when it refuses a request.
object
code
HTTP status code, repeated in the body.
integer
status
string
message
Human-readable reason.
string
Example
{ "code": 403, "status": "error", "message": "Token not found in request"}