Integrate FloFi
Developer API
Compose and preview strategies from your server, then hand the financial decision to the user in FloFi.
On this page
Availability and authentication
Base path: https://<deployment>/api/developer/v1. Send Authorization: Bearer <sandbox key> from a server secret store. Requests carrying Origin or Sec-Fetch-Site are refused; there are no browser API credentials or CORS shortcuts.
curl "https://<deployment>/api/developer/v1/capabilities" \
-H "Authorization: Bearer $FLOFI_API_KEY"bashImplemented endpoints
| Method | Path | Purpose |
|---|---|---|
| GET | /capabilities | Discover action × network availability |
| POST | /strategies | Create an immutable StrategySpec |
| POST | /strategies/{id}/validate | Re-check the engine and deployment |
| POST | /strategies/{id}/simulate | Read-only preview for a public subject |
| POST | /approvals | Create an owner approval handoff |
| GET | /approvals/{id} | Current approval and shared execution status |
| GET | /executions/{id} | Owner-shared execution status |
| GET | /executions/{id}/evidence | Canonical evidence of a shared run |
| POST | /webhook-endpoints | Register signed notifications |
| DELETE | /webhook-endpoints/{id} | Retire a webhook endpoint |
Paths in this table are relative to the base path. Download the verified OpenAPI contract. No execution, signing, submission or Manifest-approval endpoint exists.
Create, validate, hand off
const strategy = await flofi.strategies.create({
strategy: {
action: "bridge",
sourceNetwork: "base-sepolia",
destinationNetwork: "arbitrum-sepolia",
asset: "USDC", amount: "5",
},
});
const check = await flofi.strategies.validate(strategy.id);
if (!check.availability.approvable) {
throw new Error(check.availability.reason ?? "NOT_APPROVABLE");
}
const approval = await flofi.approvals.create({ strategy });
// Give approval.approvalUrl to the user.typescriptThis is a documented example, not a claim that bridge approval is enabled on every deployment. The user proves wallet ownership, re-simulates, reviews and signs in FloFi. Read Wallet Authorization.
Errors, idempotency and limits
Amounts are decimal strings. Strategies are immutable; create a new one for a changed intent. Creating POSTs use an Idempotency-Key scoped to project, environment and operation for 24 hours. Same key with a changed body yields IDEMPOTENCY_CONFLICT.
{
"error": {
"code": "STRATEGY_CHANGED",
"reason": "WORKFLOW_HASH_MISMATCH",
"message": "…",
"requestId": "req_…"
}
}jsonThe documented free plan permits 300 requests/minute, 30 simulations/hour, 60 approval creations/hour, 100 open approvals and five active webhook endpoints. Respect Retry-After. Listing strategies, GET /me, live keys and general arbitrary multi-step execution are not part of v1.
These guides summarize the repository’s current contracts. Detailed evidence and engineering history stay in their original records.
docs/developer/API.md docs/developer/QUICKSTART.md docs/deploy/DEVELOPER.md docs/developer/openapi.json