Members

Send or generate a magic login link

Generates a magic login link for the member. By default the link is sent to the member's email address and the response does NOT include the link URL.

Set sendEmail to false in the request body to skip the email and receive the link URL in the response instead, for delivery via your own channel (e.g. your own email provider, chat, or SMS). The returned URL logs the visitor in as the member with no further checks until it expires (24 hours) — treat it like a credential: deliver it over a secure channel and avoid writing it to logs or analytics.

Rate limited to 5 requests per minute per member and 50 requests per minute per site (both delivery modes share the same limits). Returns 429 Too Many Requests if the rate limit is exceeded.

POST /members/{memberId}/login-links

Send or generate a magic login link

curl --request POST \
  --url 'https://api.sotion.so/api/v1/members/{MEMBERID}/login-links' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "value"
}'
{
  "data": {
    "memberId": "<uuid>",
    "status": "sent",
    "url": "<url>",
    "expiresAt": "<date-time>"
  }
}

Login link sent (status `sent`), or generated and returned (status `created` when `sendEmail` is false — the `url` and `expiresAt` fields are present only in this case).