AiFlow API Documentation¶
AiFlow is a self-hosted AI workforce platform. Each client runs their own deployment, with their own database and their own credentials.
This is the full API reference for your own deployment. It covers configuring agents, knowledge, and tools; wiring up events, triggers, and webhooks; managing your team; and running the multi-model Orchestrator layer.
Every endpoint comes with working examples in cURL, Python, and TypeScript.
-
Credentials
Every outside account your deployment needs before it can run: Gemini, plus Twilio, WhatsApp, Telegram, Resend, CRM connectors, and SSO if your agents need them.
-
Getting started
Learn how authentication works in a self-hosted AiFlow deployment, then make your first API call in minutes.
-
Concepts
A quick tour of Agents, Triggers, Events, and Orchestrators: the core ideas behind everything else on this site.
-
Configure an agent
Create agents, upload knowledge, enable tools, and connect MCP servers, all through the API.
-
Orchestrators
Delegate tasks across models and agents: Gemini, Anthropic, OpenAI, and 100+ other providers.
-
Events & webhooks
Fire outbound calls and messages from your own systems, and get signed notifications back when something happens.
-
API reference
Every documented endpoint, generated straight from AiFlow's own route definitions.
How this site is organized¶
Getting Started walks through authentication and your first API call. Concepts covers the ideas behind the API before you start writing code against it. Guides is the full task-by-task reference, organized by area:
| Area | Covers |
|---|---|
| Agents & configuration | Agent lifecycle, knowledge documents, built-in and custom tools, MCP connections, agent-to-agent delegation |
| Events, triggers & calls | Sending and reading events, the trigger rule engine, the call log and transcripts, webhook subscriptions |
| Orchestrators | Multi-model delegation, Orchestrator tools, sub-Orchestrator graphs, shared MCP pools, the Console |
| Widget & MCP | The embeddable website widget, and AiFlow as an MCP server for external clients |
| Administration | API keys, team and role management, the audit log, data retention and deletion, observability |
Every guide that documents a real request shows the same call three ways: pick the version that matches your stack.
Start with Authentication: every other page on this site assumes you've already read it.