Documentation

POST /api/login/request

Request a sign-in link.

RequestPOST /api/login/request
AuthenticationNo authentication
Handlerbackend/server.py

What it does

The message is uniform whether or not the address has an account, so the endpoint cannot be used to test for one. `email_sent` reports what was actually observed — separated from what the visitor is told — so the screen can avoid promising an inbox when the mailer is unconfigured.

Authentication

No authentication. The response does not depend on a session.

Parameters

ParameterInTypeRequiredDescription
emailbodystringRequiredThe address to send the link to.

Request

The cookie jar carries the session between calls. Angle-bracketed values are the parameter types from the table above.

curl -s -b cookies.txt -c cookies.txt \
  -X POST -H 'Content-Type: application/json' \
  -d '{"email":"<string>"}' \
  "https://flowfinds.ai/api/login/request"
const res = await fetch("https://flowfinds.ai/api/login/request", {
  method: "POST",
  credentials: "include",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "email": "<string>"
  }),
});
const data = await res.json();
import requests

s = requests.Session()
r = s.post("https://flowfinds.ai/api/login/request", json={
    "email": "<string>"
  })
data = r.json()

Recorded example

curl -s -b cookies.txt -c cookies.txt \
  -X POST -H 'Content-Type: application/json' \
  -d '{"email":"[email protected]"}' \
  "$FLOWFINDS_ORIGIN/api/login/request"

Responses

200Always, for any well-formed address.

FieldTypeDescription
statusstring`link_requested`.
email_sentbooleanWhether a message actually left the machine.
explanationstring'If that address has an account…' — uniform by design.

Errors

StatusReasonWhen
400invalid_emailThe address is not well formed.

Related

Back to the API reference index, or read the cookbook for recipes that compose this endpoint with others.