Skip to content

Legacy alias of `POST /auth/email/start`. Works for both existing users and new ones; `sent` stays true, and the challenge fields are null while Stytch sends the email.

POST
/auth/magic-link/send
curl --request POST \
--url https://api.siteqwality.com/auth/magic-link/send \
--header 'Content-Type: application/json' \
--data '{ "email": "example", "redirect_url": "example", "turnstile_response": "example" }'
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. When we send the email instead, its path and query become the redirect_path, and only on the frontend’s own origin.

string | null
turnstile_response

Cloudflare Turnstile token from the sign-in or sign-up widget. Required wherever Turnstile is configured.

string | null
Example generated
{
"email": "example",
"redirect_url": "example",
"turnstile_response": "example"
}

Email sent (or claimed sent, so account existence is not leaked)

Media type application/json

Same body whoever sent the email, so it never reveals whether an account exists.

object
sent
required
boolean
challenge_handle

Null when Stytch sent its own link (no code box).

string | null
expires_in

Seconds until the link and code expire.

integer | null format: int64
code_length
integer | null format: int32
Example generated
{
"sent": true,
"challenge_handle": "example",
"expires_in": 1,
"code_length": 1
}

Invalid email, or turnstile_required

rate_limited

Internal server error

email_send_failed or auth_unavailable