Skip to content

Complete a magic link authentication. If the email belongs to an existing account, signs the user in. Otherwise provisions a new Site Qwality 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
curl --request POST \
--url https://api.siteqwality.com/auth/magic-link/authenticate \
--header 'Content-Type: application/json' \
--data '{ "token": "example", "promotekit_referral": "example" }'
Media type application/json
object
token
required
string
promotekit_referral

The PromoteKit referral, recorded on the Stripe customer when this click creates the account. Ignored when it signs an existing user in.

string | null
Example generated
{
"token": "example",
"promotekit_referral": "example"
}

Authenticated, or MFA required

Media type application/json
One of:

A session from a login, plus where the frontend should land.

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>
is_new_account

True only when this authentication created a new account.

boolean
redirect_path

Sanitized at start; absent on the doors that never take one.

string | null
Example
{
"methods": [
"totp"
]
}

Invalid or expired magic link

Internal server error