HTTP API

Every /v1 route of the Floodwall Cloud API: who may call it, request and answer JSON, status codes and curl.

Floodwall Cloud's API is at https://api.floodwall.ai. Every answer is JSON; a refusal is { "error": "<a sentence>" }, sometimes with a code. The TypeScript and Python clients wrap the intent routes; everything here also works with curl.

Authentication#

Agents and tools call with an API key: Authorization: Bearer fw_live_… (keys made before checkout went live start fw_test_… and keep working), from anywhere. The console calls the same routes with its session cookie, and its changes must come from the site's own pages.

Keys and scopes#

A key is 43 characters after its prefix, shown once when it is made; Floodwall keeps only its SHA-256 and its first 12 characters. A key belongs to one plane. Revoked keys answer 401.

ScopeMay
agentSubmit intents, read their status, report outcomes, and read the plane's state.
operatorAll of that, and release and expire held intents, read the ledger and its export, read and change settings (and dry runs), alerts and verification.

A key made with an agent name is bound to that agent: submitting, reading or reporting under any other agent's name answers 403. Give each agent its own bound key, so a leaked key can't speak for the rest of the fleet.

In the console, each route also needs a role on the plane's account: reading needs any role (viewer); submitting, outcomes, releases, expiries, settings and alerts need operator; keys, the keyring, making and deleting planes, the export target, the team and SSO need owner. A plane the caller can't use is 404.

Intents#

An intent is { id, agent, action, priority?, blast_radius?, signature? }, at most 16 KB: id a whole number up to 2^64 − 1 (a number or a decimal string); action one of { "kind": "apply", resource, manifest }, { "kind": "scale", resource, replicas } or { "kind": "destroy", resource }; priority bulk, normal (default), urgent or pager; blast_radius cell, service (default), region or global; signature null or the agent's Ed25519 signature in hex.

POST/v1/planes/{plane}/intents#

Who
agent or operator key; console operator
Body
{ "id": "1", "agent": "deployer", "action": { "kind": "scale", "resource": "web", "replicas": 5 }, "priority": "normal", "blast_radius": "service" }
Answer
200 { key, verdict: "admit" | "defer" | "reject", reason, policies: [{ policy, verdict, reason }] } ruled on now; 202 { key, status: "queued" }
Errors
429 rate-limited or the queue is full, with Retry-After: 1; 409 a different intent under a key already used; 401 unsigned, unknown agent or bad signature (with a keyring); 402 Free's decisions used up; 403 a bound key, another agent's name; 400 not a valid intent.

The same intent sent again (same agent, id and content) answers with where it is now (200 with its status, or 202 while queued), so retrying after a lost answer is safe.

sh
curl -s https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/intents \
  -H "Authorization: Bearer $FLOODWALL_KEY" -H "Content-Type: application/json" \
  -d '{"id":"1","agent":"deployer","action":{"kind":"scale","resource":"web","replicas":5}}'

GET/v1/planes/{plane}/intents/{agent}/{id}?wait=N#

Who
agent or operator key; any console role
Answer
200 { key, status, verdict, reason, policies, updated }
Errors
404 unknown intent. With wait (up to 20 seconds) the answer waits until the status changes from what it was when asked; a final status answers at once.
sh
curl -s "https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/intents/deployer/1?wait=20" -H "Authorization: Bearer $FLOODWALL_KEY"

POST/v1/planes/{plane}/intents/{agent}/{id}/outcome#

Who
agent or operator key; console operator
Body
{ "outcome": "succeeded" | "failed", "reason"?: "..." }
Answer
200 { status }: its status now
Errors
409 not in flight. reason is free text: control characters become spaces and it is cut to 1,024 characters.
sh
curl -s https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/intents/deployer/1/outcome \
  -H "Authorization: Bearer $FLOODWALL_KEY" -H "Content-Type: application/json" -d '{"outcome":"failed","reason":"rollout timed out"}'

Hold queue#

GET/v1/planes/{plane}/held#

Who
operator key; any console role
Answer
200 { held: [{ key, intent, since, reason }] }
sh
curl -s https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/held -H "Authorization: Bearer $FLOODWALL_KEY"

POST/v1/planes/{plane}/held/{agent}/{id}/release#

Who
operator key; console operator
Answer
200 { status }: a release is ruled on at once, its deferrals waived
Errors
409 not held. Recorded in the ledger as by the member's address, or key:<key name>.
sh
curl -s -X POST https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/held/deployer/1/release -H "Authorization: Bearer $FLOODWALL_KEY"

POST/v1/planes/{plane}/held/{agent}/{id}/expire#

Who
operator key; console operator
Answer
200 { status }
Errors
409 not held.
sh
curl -s -X POST https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/held/deployer/1/expire -H "Authorization: Bearer $FLOODWALL_KEY"

Planes#

GET/v1/planes#

Who
any key (its own plane); any console user
Answer
200 { planes: [{ id, name, createdAt, account, accountName, role }] }

Across every account the user is a member of, their own first. A key sees its own plane, without a role.

sh
curl -s https://api.floodwall.ai/v1/planes -H "Authorization: Bearer $FLOODWALL_KEY"

POST/v1/planes#

Who
console, owner
Body
{ "name": "prod", "settings"?: { ... }, "account"?: "<account id>" }
Answer
201 { plane, settings: "<label>" }
Errors
402 over the plan's planes (Free 1, Team 5, Business no limit); 409 name taken; 400 settings the crate refuses; 403 not an owner there.

GET/v1/planes/{plane}#

Who
any key; any console role
Answer
200 { plane, state: { clock, queued, in_flight, held, ledger: { records, head }, settings, decisions_this_month, prometheus } }

prometheus is the plane's counters in the Prometheus text format: per agent, what was refused at the door and why, admitted, deferred, rejected, released, expired and how it turned out.

sh
curl -s https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE -H "Authorization: Bearer $FLOODWALL_KEY"

DELETE/v1/planes/{plane}#

Who
console, owner (an API key gets 403)
Body
{ "confirm": "<the plane's name>" }
Answer
200 { deleted: <plane> }
Errors
400 without the right name.

Revokes the plane's keys, wipes its state and ledger, and deletes its archive. Copies already exported to your own bucket stay. It can't be undone.

Ledger and audit#

GET/v1/planes/{plane}/ledger?since=&limit=#

Who
operator key; any console role
Answer
200 { lines: [{ seq, entry }], next, retention: { days, omitted, omitted_through } }

Up to 500 lines after since, within the plan's retention (Free 7 days, Team 90, Business 365). Anything older is left out, and retention says so.

sh
curl -s "https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/ledger?limit=100" -H "Authorization: Bearer $FLOODWALL_KEY"

GET/v1/planes/{plane}/export#

Who
operator key; any console role
Answer
the whole ledger as ledger.jsonl (application/jsonl)

Whole, whatever the retention: the archive is streamed back in. See Auditing.

sh
curl -s https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/export -H "Authorization: Bearer $FLOODWALL_KEY" -o ledger.jsonl

GET/v1/planes/{plane}/keys#

Who
operator key; any console role
Answer
200 keys.json: { plane, agents, retired }

The plane's checkpoint key and the agents' public keys, for tools/verify-ledger.mjs.

sh
curl -s https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/keys -H "Authorization: Bearer $FLOODWALL_KEY" -o keys.json

GET/v1/planes/{plane}/verification#

Who
operator key; any console role
Answer
200 { checkedAt, verified, records, checkpoints, signed_checkpoints: { checked, failed_at }, from_line, archive_chunks, error }
Errors
404 before the first daily check. Business only.
sh
curl -s https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/verification -H "Authorization: Bearer $FLOODWALL_KEY"

GET/v1/planes/{plane}/export-target#

Who
operator key; any console role
Answer
200 { endpoint, region, bucket, prefix, access_key_id, secret_access_key: "********", status: { exported_through, last_success_at, last_error, last_error_at } }

PUT/v1/planes/{plane}/export-target#

Who
console, owner; Business
Body
{ "endpoint": "https://s3.us-east-1.amazonaws.com", "region": "us-east-1", "bucket": "acme-ledgers", "prefix": "floodwall/", "access_key_id": "AKIA…", "secret_access_key": "…" }
Answer
200 the target, the secret masked
Errors
402 on Free and Team.

Each day the plane's new archive chunks are copied to your S3-compatible bucket (AWS S3, R2, GCS's XML API, MinIO) at <prefix><plane>/ledger/<chunk>. The key needs only s3:PutObject on the prefix; the secret is stored encrypted and never returned. DELETE on the same path removes the target.

Settings and keyring#

GET/v1/planes/{plane}/settings#

Who
operator key; any console role
Answer
200 { label, settings }
sh
curl -s https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/settings -H "Authorization: Bearer $FLOODWALL_KEY"

PUT/v1/planes/{plane}/settings#

Who
operator key; console operator
Body
{ "rules": "format 1\n...", "burst": 8, "refill_millis": 1000, ... }
Answer
200 { label, changed }
Errors
400 settings the crate refuses, with the sentence saying why (a rules file's line and column).

Moves the plane to the new settings, recorded in the ledger. The fields are in Settings.

sh
curl -s -X PUT https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/settings -H "Authorization: Bearer $FLOODWALL_KEY" -H "Content-Type: application/json" \
  --data-binary @settings.json

POST/v1/planes/{plane}/settings/dry-run#

Who
operator key; console operator
Body
{ "settings": { ... }, "intents"?: [ ... ] }
Answer
200 { decisions }: each intent's gate decision under those settings

Without intents, the plane's latest 1,000. Changes nothing.

sh
curl -s https://api.floodwall.ai/v1/planes/$FLOODWALL_PLANE/settings/dry-run -H "Authorization: Bearer $FLOODWALL_KEY" -H "Content-Type: application/json" \
  -d '{"settings":{"rules":"format 1\npolicy \"no-destroy\" {\n  reject \"no destroys\" when destructive\n}\n"}}'

PUT/v1/planes/{plane}/keyring#

Who
console, owner
Body
{ "keyring": { "agents": { "deployer": "<hex public key>" }, "retired"?: { "deployer": ["<hex>"] } } | null }
Answer
200 { keyring } as stored
Errors
409 keyring_refused if the plane couldn't reopen under it (its stored ledger holds unsigned intents, or intents signed by a key left out).

With a keyring, every intent must be signed by its agent. An agent's replaced key is kept under retired automatically, so its past intents still verify. Add a keyring to a new plane; taking it away (null) always works.

Alerts and Slack#

GET/v1/planes/{plane}/alerts#

Who
operator key; any console role
Answer
200 { email, slack_channel, slack_team, slack_enabled }

PUT/v1/planes/{plane}/alerts#

Who
operator; slack_channel: console, owner
Body
{ "email"?: true | false, "slack_channel"?: "C0123ABCD" | "#ops" | null }
Answer
200 the settings after the change; fields left out stay
Errors
400 anything else.
Who
console
Answer
200 { team, user, linked_to_you, linked_to_other }
Errors
400 a token that is wrong or expired.

POST/v1/slack/link#

Who
console
Body
{ "token": "...", "replace"?: true }
Answer
200 { linked: { team, user }, replaced }
Errors
409 that Slack user is linked to another account (send replace: true to move it); 400 a bad token.

API keys#

GET/v1/keys?plane=<id>#

Who
console, owner
Answer
200 { keys: [{ id, plane, name, scope, prefix, createdAt, lastUsedAt, revokedAt }] }

POST/v1/keys#

Who
console, owner
Body
{ "plane": "pl_…", "name": "deployer", "scope": "agent" | "operator", "agent"?: "deployer" }
Answer
201 { key: {...}, secret: "fw_live_…" }: the only time the secret is shown

DELETE/v1/keys/{id}#

Who
console, owner
Answer
200 { key } with revokedAt; the key answers 401 from then on

Usage#

GET/v1/usage?account=#

Who
console
Answer
200 { month, cap, decisions, planes: [{ id, name, createdAt, decisions }] }

Decisions (admit, defer and reject records) this UTC month, for the account (the user's own when left out). A decision is one intent the gate rules on; arrivals, releases, expiries and outcomes aren't counted.

Accounts, members and invites#

RoleMay
viewerRead: the planes' state, held intents, the ledger and its export, settings, alerts, verification, usage, the members.
operatorA viewer's reads, and act: submit from the console, release and expire, outcomes, settings and dry runs, alerts.
ownerEverything: API keys, the keyring, making and deleting planes, the export target, the team, SSO, billing.

GET/v1/accounts#

Who
console
Answer
200 { accounts: [{ id, name, email, plan, role, own }] }

GET/v1/accounts/{account}/members#

Who
any member
Answer
200 { members: [{ id, email, name, role, addedAt, holder }] }
Errors
404 not a member.

PATCH/v1/accounts/{account}/members/{user}#

Who
owner
Body
{ "role": "viewer" | "operator" | "owner" }
Answer
200 { member }
Errors
409 the first owner; 404 no such member.

DELETE/v1/accounts/{account}/members/{user}#

Who
owner, or the member themselves
Answer
200 { removed }
Errors
409 the first owner.

GET/v1/accounts/{account}/invites#

Who
owner
Answer
200 { invites: [{ id, email, role, invitedBy, createdAt, expiresAt }] }

POST/v1/accounts/{account}/invites#

Who
owner
Body
{ "email": "ada@example.com", "role": "operator" }
Answer
201 { invite }, and an email with a link that lasts 7 days and works once
Errors
409 already a member; 402 Free's limit of 3 people; 429 too many invites; 502 the email couldn't be sent.

DELETE/v1/accounts/{account}/invites/{id}#

Who
owner
Answer
200
Errors
404 no such pending invite.

POST/v1/invites/accept#

Who
console, signed in as the invited address
Body
{ "token": "..." }
Answer
200 { account }
Errors
403 signed in with another address; 400 used, withdrawn, expired or unknown; 402 Free's limit.

Single sign-on#

Business. See the console guide for setting up a provider and proving a domain.

PUT/v1/accounts/{account}/sso#

Who
owner
Body
{ "issuer": "https://acme.okta.com", "client_id": "...", "client_secret": "...", "email_domains": ["acme.com"], "default_role": "viewer", "require_sso": false }
Answer
200 the settings as GET shows them
Errors
402 not Business; 400 bad input, a public mail domain, or a discovery document that can't be read or names another issuer; 409 a domain another account has proven.

GET/v1/accounts/{account}/sso#

Who
owner
Answer
200 { issuer, client_id, client_secret: "********", email_domains, domains: [{ domain, verified, verified_at, dns_record: { type: "TXT", name, value } }], default_role, require_sso, redirect_uri, updated_at }
Errors
404 none.

POST/v1/accounts/{account}/sso/domains/{domain}/verify#

Who
owner, Business
Answer
200 { domain, verified: true, verified_at }
Errors
409 the TXT record isn't there, or another account has proven the domain; 404 not one of the account's domains; 429 over 30 checks an hour; 502 DNS can't be reached.

DELETE/v1/accounts/{account}/sso#

Who
owner
Answer
200
Errors
404 none.

Limits and status codes#

StatusMeaning
400The request is malformed: the sentence in error says what.
401No key, a revoked key, or (with a keyring) an unsigned, unknown-agent or badly signed intent.
402The plan doesn't include it: a plane over the plan's count, Free's decisions used up, a Business feature.
403The key's scope, the member's role or a bound key's agent doesn't allow it.
404No such plane (or one you can't use), intent or member.
409A conflict: a duplicate intent, an intent not in flight or not held, a name taken.
429Too many: the agent's rate limit, a full queue (Retry-After: 1), or the API's own limits.
5xxThe plane couldn't be reached. Only these, and network failures, count as unreachable to the clients.