Create an ingestion key
Connect & settings → API keys → Create key.
FLOWWATCH / API PORTAL / V1
The first-party API for sending runtime signals, recording business outcomes and operating FlowWatch from your own tooling.
01 / QUICKSTART
Use an ingestion key from Connect & settings in your FlowWatch workspace. The key is shown once; store it in your runtime’s secret manager.
Connect & settings → API keys → Create key.
Send safe operational metadata as each workflow finishes.
Policies detect failures, cost drift and missing outcomes.
curl -X POST http://localhost:8000/api/v1/events \
-H "X-API-Key: fw_your_ingestion_key" \
-H "Content-Type: application/json" \
-d '{
"workflow_external_id": "lead-router",
"workflow_name": "Lead Router",
"platform": "n8n",
"execution_id": "run-1042",
"status": "success",
"duration_ms": 842,
"cost_usd": 0.018,
"business_result": true
}'02 / ACCESS MODEL
Use X-API-Key only for runtime telemetry and outcome ingestion. Each key belongs to exactly one organization.
Use a workspace session or bearer token for workflows, incidents, budgets and configuration.
Owner, admin, operator or viewerDo not send prompts, messages, tool arguments or outputs. FlowWatch uses bounded operational metadata.
Safe metrics, IDs and status onlyTELEMETRY
One endpoint for n8n, custom runtimes and workflow engines.
/api/v1/eventsIngest a workflow execution+Creates or updates a workflow, stores the execution and evaluates reliability policy. Repeating the same execution ID is idempotent.
X-API-Key202 Accepted{ "workflow_external_id": "lead-router", "execution_id": "run-1042", "status": "error", "duration_ms": 8450, "cost_usd": 0.18 }/api/v1/eventsList recent executions+Workspace-authenticated list for filtering and investigation.
GET /api/v1/events?limit=100AGENTOPS
Capture model, tool and business signals without collecting content.
/api/v1/telemetry/eventsIngest an agent lifecycle event+Use lifecycle types such as session.completed, model.failed and business.succeeded.
X-API-Key202 Accepted{ "agent_external_id": "support-agent", "session_external_id": "session-998", "event_type": "session.completed", "duration_ms": 1200 }/api/v1/agent-sessionsList agent sessions+Retrieve workspace-scoped session data and compare it with successful peers.
GET /api/v1/agent-sessions?limit=100OUTCOMES
Keep technical success distinct from the outcome the business needs.
/api/v1/outcome-contractsDefine an expected outcome+Attach a measurable business goal to a workflow or agent.
201 Created{ "resource_kind": "workflow", "resource_id": 42, "name": "Qualified lead created", "target_success_rate": 0.95, "confirmation_window_minutes": 1440 }/api/v1/outcome-contracts/{id}/records/ingestConfirm an outcome from a runtime+Use an ingestion key from a CRM, payment flow or downstream service to confirm or miss a result.
{ "external_id": "lead-1042", "status": "confirmed", "value": 1200 }INTELLIGENCE
Read the facts behind an operational decision.
/api/v1/traces/compareCompare a run with healthy peers+Pass exactly one event_id or session_id. Safe metrics are compared with successful peers.
GET /api/v1/traces/compare?event_id=1042/api/v1/health-explanationExplain the health score+Shows failures, business misses, incidents and unhealthy resources.
GET /api/v1/health-explanation?days=30/api/v1/cost-intelligenceRead spend and outcome efficiency+Returns platform breakdown, cost per operation and budget forecasts.
GET /api/v1/cost-intelligence?days=30/api/v1/optimization-advisorRank token, model and operational risk+Ranks agents and workflows using measured token use, cost, failures, missed outcomes and risky tool events. Returns evidence-led optimisation suggestions.
GET /api/v1/optimization-advisor?days=30/api/v1/api-balance-monitorsList safe provider credit checks+Returns balance state and masked endpoint hints; provider credentials and response bodies are never returned.
GET /api/v1/api-balance-monitorsOPERATIONS
Operate incidents, workflows and cross-workspace views.
/api/v1/incidents/{id}/roomOpen the Incident Room+Returns changes, contracts, dependencies, delivery and recovery actions.
GET /api/v1/incidents/82/room/api/v1/topology/dependenciesMap a dependency path+Connect workflow, agent and notification resources.
{ "source_kind": "workflow", "source_id": 42, "target_kind": "agent", "target_id": 7, "relationship": "depends_on" }/api/v1/command-centerRead ranked operational decisions+Groups runtime health and prioritizes decisions by risk and exposure.
GET /api/v1/command-center?days=7&group_by=platform