Documentation

POST /api/journey/[id]/consume

Redeem a journey carrier once.

RequestPOST /api/journey/[id]/consume
AuthenticationSession cookie required
Handlerflowfinds-organ/app/api/journey/[id]/consume/route.ts

What it does

Consumes the carrier and returns its payload. A carrier is consumed after a full document load, which for a guest can be the very navigation that creates them, so this mints a guest rather than refusing. The security properties are unchanged: the single-use identifier bound to the request fingerprint is what authorises consumption, and a carrier bound to a sign-in link is still refused for a guest, because a guest's synthetic address can never equal a magic-link email.

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
idpathstringRequiredThe carrier identifier.

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' \
  "https://flowfinds.ai/api/journey/[id]/consume"
const res = await fetch("https://flowfinds.ai/api/journey/[id]/consume", {
  method: "POST",
  credentials: "include",
});
const data = await res.json();
import requests

s = requests.Session()
r = s.post("https://flowfinds.ai/api/journey/[id]/consume")
data = r.json()

Recorded example

curl -s -b cookies.txt -c cookies.txt \
  -X POST -H 'Content-Type: application/json' \
  -d '{}' \
  "$FLOWFINDS_ORIGIN/api/journey/<id>/consume"

Responses

200The carrier was redeemed. The body is the payload that was stored.

Errors

StatusReasonWhen
403owner-mismatchThe carrier is bound to a sign-in link for a different address.
404The carrier is unknown or has already been consumed.

Related

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