Change a password. Verifies the current password before applying the new one.
POST
/account/security/password/change
const url = 'https://api.siteqwality.com/account/security/password/change';const options = { method: 'POST', headers: {Authorization: 'Bearer <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://api.siteqwality.com/account/security/password/change \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "current_password": "example", "new_password": "example" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
current_password
required
string
new_password
required
string
Example generated
{ "current_password": "example", "new_password": "example"}Responses
Section titled “ Responses ”Password changed
Media type application/json
object
ok
required
boolean
Example generated
{ "ok": true}Invalid new password
Current password is incorrect
Endpoint requires a user session
Internal server error
Stytch API call failed