Skip to main content
POST
/
api
/
auth
/
email
/
verify
Verify email with code or link
curl --request POST \
  --url https://api.example.com/api/auth/email/verify \
  --header 'Content-Type: application/json' \
  --data '
{
  "otp": "123456",
  "email": "[email protected]"
}
'
{
  "user": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "email": "[email protected]",
    "profile": {
      "name": "<string>",
      "avatar_url": "<string>"
    },
    "metadata": {},
    "emailVerified": true,
    "providers": [
      "<string>"
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "accessToken": "<string>",
  "csrfToken": "<string>",
  "refreshToken": "<string>",
  "redirectTo": "<string>"
}

Query Parameters

client_type
enum<string>
default:web

Client type determines how refresh tokens are returned:

  • web: Refresh token stored in httpOnly cookie, csrfToken returned in response
  • mobile/desktop: refreshToken returned directly in response body
Available options:
web,
mobile,
desktop

Body

application/json
otp
string
required

Either a 6-digit numeric code or a 64-character hex token from magic link

Example:

"123456"

email
string<email>

Required for numeric code verification, omit for magic link verification

Response

Email verified successfully, session created

user
object
accessToken
string

JWT authentication token

csrfToken
string | null

CSRF token for use with refresh endpoint (web clients only)

refreshToken
string | null

Refresh token for mobile/desktop clients (null for web clients)

redirectTo
string<uri>

Optional URL to redirect user after verification (only present if configured)