Skip to main content
import { useCallback } from 'react';
import { useStytch } from '@stytch/react';

export const Login = () => {
const stytch = useStytch();

const resetPasswordStart = useCallback(() => {
  stytch.passwords.resetByEmailStart({
    email: '${exampleEmail}',
  });
}, [stytch]);

return <button onClick={resetPasswordStart}>Reset Password Start</button>;
};
{
    "status_code": 200,
    "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
    "user_id": "user-test-16d9ba61-97a1-4ba4-9720-b03761dc50c6",
    "email_id": "email-test-81bf03a8-86e1-4d95-bd44-bb3495224953"
}
The passwords.resetByEmailStart method wraps the Reset By Email Start Password API endpoint. This endpoint initiates a password reset for the email address provided. This will trigger an email to be sent to the address, containing a magic link that will allow them to set a new password and authenticate.

Parameters

email
string
required
The email of the user.
Configuration
object
Additional configuration.

Response

user_id
string
The unique ID of the affected User.
email_id
string
The unique ID of a specific email address.
request_id
string
Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
status_code
number
The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.