Skip to content

Verify Magic Link

POST
/api/auth/magic-link/verify
curl --request POST \
--url https://example.com/api/auth/magic-link/verify \
--header 'Content-Type: application/json' \
--data '{ "code": "example", "deal_id": "example" }'

Verify a magic link code and issue a JWT + refresh token.

Body: code: The magic link code from the email URL deal_id: Optional deal ID (from invite links) for post-login redirect

Returns: {“access_token”: ”…”, “refresh_token”: ”…”, “user”: {…}, “redirect_deal_id”: ”…” (if invite resolved)}

Media type application/json
MagicLinkVerifyBody
object
code
required
Code
string
deal_id
Any of:
string
Example generated
{
"code": "example",
"deal_id": "example"
}

Successful Response

Media type application/json
LoginResponse

Response from POST /auth/login and POST /auth/magic-link/verify.

NOTE (D6 fix, May 2026): refresh tokens are emitted as Set-Cookie headers only — there is intentionally no refresh_token field in the body. Legacy UI code that read data.refresh_token was always reading undefined; that read has been removed in lockstep.

object
access_token
required
Access Token
string
user
required
LoginUserDict

Inner user payload of a login response.

object
id
required
Id
string
display_name
Any of:
string
email
Any of:
string
avatar_url
Any of:
string
provider
Any of:
string
expires_in_minutes
Any of:
integer
has_deals
Any of:
boolean
force_password_change
Any of:
boolean
matomo_visitor_id
Any of:
string
key
additional properties
any
Example generated
{
"access_token": "example",
"user": {
"id": "example",
"display_name": "example",
"email": "example",
"avatar_url": "example",
"provider": "example"
},
"expires_in_minutes": 1,
"has_deals": true,
"force_password_change": true,
"matomo_visitor_id": "example"
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}