Documentation
POST /api/account
Save the account a claim is credited to.
| Request | POST /api/account |
|---|---|
| Authentication | Session cookie required |
| Handler | backend/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
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ff_session | cookie | string | Optional | The 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. |
email | body | string | Required | The address. Refused as `invalid_email` when unusable. |
source | body | string | Optional | Where the account came from. Recorded, then read back from the row. |
fix_token | body | string | Optional | A 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
200 — The account was saved.
| Field | Type | Description |
|---|---|---|
status | string | `account_saved`. |
tier | string | The tier identifier. |
tier_label | string | Its display label. |
adopted_claims | array | Claims made as a visitor and now credited to this account. |
source | string | Read back from the stored row. |
Errors
| Status | Reason | When |
|---|---|---|
400 | invalid_email | The address is not usable. |
409 | — | The address belongs to a different account and the claims cannot be adopted. |
Related
POST /api/login/request— Request a sign-in link.POST /api/logout— Sign out.GET /api/settings/business— The business settings the support desk reads.POST /api/settings/business— Save the business settings.GET /api/settings/payout— The payout destination.POST /api/settings/payout— Save the payout destination.POST /api/settings/rules— Manage the support desk's keyword rules.
Back to the API reference index, or read the cookbook for recipes that compose this endpoint with others.