Password reset by existing Password

POSThttps://test.stytch.com/v1/passwords/existing_password/reset

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.


Body parameters


email*string

existing_password*string

new_password*string

session_custom_claimsmap<string, any>

session_duration_minutesint

session_jwtstring

session_tokenstring

Response fields


status_codeint

request_idstring

user_idstring

userobject

session_jwtstring

session_tokenstring

sessionobject
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": "EfO0y+^q$mahyxtO"
  }'

RESPONSE

200
{
  "status_code": 200,
  "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
  "user_id": "user-test-16d9ba61-97a1-4ba4-9720-b03761dc50c6"
}