---
title: "Request a magic link for login or registration"
method: POST
path: "/api/v1/auth/request/link"
tags: ["auth"]
---

# Request a magic link for login or registration

`POST /api/v1/auth/request/link`

Sends a passwordless magic link to the given email address. If an account with that
email already exists, a login link is sent. If no account exists, a registration link
is sent and the recipient completes sign-up by clicking through. This unified endpoint
lets you implement a single email-entry UI that handles both cases transparently.

The `redirect_uri` is validated against the app's registered hosts; an unregistered
URI returns HTTP 400. Both `email` and `redirect_uri` are required. Requests are
rate-limited per IP (10 per minute) and per email-IP pair (3 per minute). Returns
HTTP 204 on success — no body.

## Request body

- object
  - `email` string — Email address to send the magic link to.
  - `redirect_uri` string — URL the user is redirected to after clicking the magic link. Must be registered with the app.

## Response `204`

No content

## Other responses

- `400` — Missing email or redirect_uri
- `422` — Validation failed
- `429` — Rate limited

---

[API](https://skmtc.net/archastro/apis/archastro-platform-api.md) · [All operations](https://skmtc.net/archastro/apis/archastro-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/archastro/archastro-platform-api/revisions/a8772b442f86/schema)
