Verify Magic Link
POST
/api/auth/magic-link/verify
const url = 'https://example.com/api/auth/magic-link/verify';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"example","deal_id":"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://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)}
Request Body required
Section titled “Request Body required ”Responses
Section titled “ Responses ”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
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>
ValidationErrorobject
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": {} } ]}