Complete a magic link authentication. If the email belongs to an existing account, signs the user in. Otherwise provisions a new SiteQwality account, Stytch organization, Stripe customer, default notification group, and welcome email. This is the same shape as `/signup` minus the password.
POST
/auth/magic-link/authenticate
const url = 'https://api.siteqwality.com/auth/magic-link/authenticate';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"token":"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/authenticate \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Request Body required
Section titled “Request Body required ” Media type application/json
object
token
required
string
Example generated
{ "token": "example"}Responses
Section titled “ Responses ”Authenticated
Media type application/json
Unified authentication response returned by login, signup, and refresh endpoints.
object
session_token
required
string
session_jwt
required
string
member
required
Full member info returned on every authentication response.
object
name
string | null
email
required
string
organization_id
required
string
roles
required
Array<string>
Example generated
{ "session_token": "example", "session_jwt": "example", "member": { "name": "example", "email": "example", "organization_id": "example", "roles": [ "example" ] }}Invalid or expired magic link
Internal server error