Documentation

POST /api/account

Save the account a claim is credited to.

RequestPOST /api/account
AuthenticationSession cookie required
Handlerbackend/server.py

What it does

Creates or updates the account and adopts the claims this session already made as a visitor — email moved to the end of the journey, so the claim exists before the account does. `source` is read back from the stored row rather than echoed from the request, because what the caller sent and what was stored are two facts and only the second one is true. A `fix_token` adopts a Fix run made before the account existed.

Authentication

Session cookie required. Send the ff_session cookie. Without one the engine treats the caller as a new visitor with no holds and no claims, and returns a new cookie to use from then on.

Parameters

ParameterInTypeRequiredDescription
ff_sessioncookiestringOptionalThe session identifier. Omit it on the first call and store the value the response sets; every later call must send the same one or the engine treats the caller as a new visitor with no holds and no claims.
emailbodystringRequiredThe address. Refused as `invalid_email` when unusable.
sourcebodystringOptionalWhere the account came from. Recorded, then read back from the row.
fix_tokenbodystringOptionalA Fix run token to adopt onto the new account.

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>","source":"<string>","fix_token":"<string>"}' \
  "https://flowfinds.ai/api/account"
const res = await fetch("https://flowfinds.ai/api/account", {
  method: "POST",
  credentials: "include",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "email": "<string>",
    "source": "<string>",
    "fix_token": "<string>"
  }),
});
const data = await res.json();
import requests

s = requests.Session()
r = s.post("https://flowfinds.ai/api/account", json={
    "email": "<string>",
    "source": "<string>",
    "fix_token": "<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]","source":"…"}' \
  "$FLOWFINDS_ORIGIN/api/account"

Responses

200The account was saved.

FieldTypeDescription
statusstring`account_saved`.
tierstringThe tier identifier.
tier_labelstringIts display label.
adopted_claimsarrayClaims made as a visitor and now credited to this account.
sourcestringRead back from the stored row.

Errors

StatusReasonWhen
400invalid_emailThe address is not usable.
409The address belongs to a different account and the claims cannot be adopted.

Related

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