Skip to content
Docs
Developer API

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.

Capability discovery
curl "https://<deployment>/api/developer/v1/capabilities" \
  -H "Authorization: Bearer $FLOFI_API_KEY"
bash

Implemented endpoints

MethodPathPurpose
GET/capabilitiesDiscover action × network availability
POST/strategiesCreate an immutable StrategySpec
POST/strategies/{id}/validateRe-check the engine and deployment
POST/strategies/{id}/simulateRead-only preview for a public subject
POST/approvalsCreate an owner approval handoff
GET/approvals/{id}Current approval and shared execution status
GET/executions/{id}Owner-shared execution status
GET/executions/{id}/evidenceCanonical evidence of a shared run
POST/webhook-endpointsRegister 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

Server-side TypeScript
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.
typescript

This 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 envelope
{
  "error": {
    "code": "STRATEGY_CHANGED",
    "reason": "WORKFLOW_HASH_MISMATCH",
    "message": "…",
    "requestId": "req_…"
  }
}
json

The 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.

Primary sources

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
Built with FloFi. Designed for decisions you can inspect.
Documentation