Reset the User’s password using their existing password.
Note that a successful password reset via an existing password will revoke all active sessions for the user_id.
Consumer Authentication
/
API reference
/
Passwords
/
Reset options
/
Password reset by existing password
Reset the User’s password using their existing password.
Note that a successful password reset via an existing password will revoke all active sessions for the user_id.
curl --request POST \
--url https://test.stytch.com/v1/passwords/existing_password/reset \
-u 'PROJECT_ID:SECRET' \
-H 'Content-Type: application/json' \
-d '{
"email": "sandbox@stytch.com",
"existing_password": "old_password",
"new_password": "6Ux%Wwy4juyx9rMP"
}'
{
"status_code": 200,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
"user_id": "user-test-16d9ba61-97a1-4ba4-9720-b03761dc50c6"
}