Send a discovery magic link to the given email. Works for both existing users (signs them in) and new users (provisioning happens on click via `/auth/magic-link/authenticate`).
POST
/auth/magic-link/send
const url = 'https://api.siteqwality.com/auth/magic-link/send';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"email":"example","redirect_url":"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/auth/magic-link/send \ --header 'Content-Type: application/json' \ --data '{ "email": "example", "redirect_url": "example" }'Request Body required
Section titled “Request Body required ” Media type application/json
object
email
required
string
redirect_url
SPA URL the Stytch email link should redirect to. The SPA reads the
token query param and POSTs it to /auth/magic-link/authenticate.
Defaults to ${base_frontend_url}/auth/magic-link/callback.
string | null
Example generated
{ "email": "example", "redirect_url": "example"}Responses
Section titled “ Responses ”Magic link sent (or claimed sent, so account existence is not leaked)
Media type application/json
object
sent
required
Always true in the success path. Frontend uses this as a “check your
email” trigger. It does not leak whether the user exists.
boolean
Example generated
{ "sent": true}Invalid email
Rate limited
Internal server error