B2B Saas Authentication

/

Frontend SDKs

/

Headless

/

Email Magic Links

/

Send Discovery Email

Send discovery email


Method parameters


email_address*string

discovery_redirect_urlstring

login_template_idstring

localestring
import { useStytchB2BClient } from '@stytch/react/b2b';

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

  const sendDiscoveryEmail = () => {
    stytch.magicLinks.email.discovery.send({
      email_address: 'sandbox@stytch.com',
    });
  };

  return <button onClick={sendDiscoveryEmail}>Send email</button>;
};

RESPONSE

200
{
    "status_code": 200,
    "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141"
  }