---
title: "Verify magic link and authenticate user"
method: POST
path: "/api/auth/magic-link/verify"
tags: ["Auth"]
---

# Verify magic link and authenticate user

`POST /api/auth/magic-link/verify`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/api/auth/magic-link/verify`
- Auth: none declared

Validates the magic link token, marks it as used, and returns authentication tokens

## Request body

- object
  - `token` string, required: The magic link token

## Response `200`

Authentication successful

- object
  - `success` boolean
  - `data` object
    - `user` User
      - `id` string, uuid
      - `email` string
      - `first_name` string
      - `last_name` string
      - `job_title` string
      - `avatar_url` string
      - `initials` string
      - `display_name` string
      - `personas` object[]
    - `tokens` object
      - `accessToken` string
      - `refreshToken` string
    - `isFirstLogin` boolean

## Other responses

- `400`: Invalid or expired token
- `404`: Token not found

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
