Integrate FlowBot AI into your applications. Trigger WhatsApp flows, send messages, manage conversations, and generate AI-powered flows programmatically.
https://your-domain.comJSON (application/json)JWT Bearer / Cookie / Legacy per-flow authAdmin approves API usage in User Management, then rotate key in Settings → API Access
POST /api/auth/api-token → get `accessToken`
POST /api/webhook/outbound, POST /api/webhook/flow/{flowId}/lead with Bearer JWT
Copy-paste ready snippets for the core integration flows in exactly these languages: cURL, Node.js, Python, PHP.
Structured documentation of platform capabilities and the exact APIs used to implement each one.
Complete inventory of system APIs (integration + internal), grouped by domain. Use this as the main map for third-party integration and AI orchestration.
/api/auth/loginLoginAuthenticate and receive a session cookie (JWT). Use this cookie in subsequent authenticated requests.
{
"username": "your_username",
"password": "your_password"
}{
"user": {
"id": "uuid",
"username": "your_username",
"displayName": "Your Name",
"email": "[email protected]",
"role": "user"
}
}curl -X POST {BASE_URL}/api/auth/login \
-H "Content-Type: application/json" \
-c cookies.txt \
-d '{"username": "your_username", "password": "your_password"}'/api/auth/api-tokenExchange Client Credentials to API JWTUse the client credentials from Settings -> API Access to get a short-lived Bearer JWT for server-to-server API calls.
{
"clientId": "aiflow_....",
"apiKey": "sk_xxxxxxxxxxxxxxxxx",
"ttlSec": 3600
}{
"success": true,
"tokenType": "Bearer",
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresInSec": 3600,
"clientNumber": "user-uuid",
"clientId": "aiflow_...."
}curl -X POST {BASE_URL}/api/auth/api-token \
-H "Content-Type: application/json" \
-d '{"clientId":"YOUR_CLIENT_ID","apiKey":"YOUR_API_KEY","ttlSec":3600}'/api/webhook/outboundTrigger Outbound FlowSend a proactive WhatsApp message by triggering an outbound flow. This is the primary endpoint for external systems to initiate conversations.
{
"phone": "+972501234567",
"flowId": "your-flow-uuid",
"templateGroupId": "YOUR_TEMPLATE_GROUP_ID",
"data": {
"customerName": "John Doe",
"orderId": "ORD-12345",
"templateParams": ["123456"],
"code": "123456"
}
}{
"success": true,
"message": "Outbound flow triggered for +972501234567",
"flowId": "your-flow-uuid"
}curl -X POST {BASE_URL}/api/webhook/outbound \
-H "Content-Type: application/json" \
-H "Authorization: Bearer FLOW_OUTBOUND_TOKEN_OR_JWT" \
-d '{
"phone": "+972501234567",
"flowId": "flow-uuid",
"templateGroupId": "YOUR_TEMPLATE_GROUP_ID",
"data": {
"customerName": "John",
"orderId": "ORD-123",
"templateParams": ["123456"],
"code": "123456"
}
}'/api/webhook/flow/{flowId}/leadSend Lead to FlowSend a lead from your CRM, website form, or any external system to trigger a specific flow. Fields are automatically mapped to flow variables.
{
"phone": "+972501234567",
"name": "John Doe",
"email": "[email protected]",
"source": "website",
"product": "Premium Plan"
}{
"success": true,
"message": "Lead received and flow started",
"variables": ["phone", "name", "email", "source", "product"]
}# Preferred (API JWT):
curl -X POST {BASE_URL}/api/webhook/flow/FLOW_ID/lead \
-H "Content-Type: application/json" \
-H "Authorization: Bearer FLOW_OUTBOUND_TOKEN_OR_JWT" \
-d '{
"phone": "+972501234567",
"name": "John Doe",
"email": "[email protected]"
}'
# With HMAC-SHA256:
BODY='{"phone":"+972501234567","name":"John"}'
SIGNATURE=$(echo -n "$BODY" | openssl dgst -sha256 -hmac "YOUR_HMAC_SECRET" | awk '{print $2}')
curl -X POST {BASE_URL}/api/webhook/flow/FLOW_ID/lead \
-H "Content-Type: application/json" \
-H "X-Signature-256: $SIGNATURE" \
-d "$BODY"/api/flowsList FlowsRetrieve all flows belonging to the authenticated user. Admin users can filter by userId.
[
{
"id": "flow-uuid",
"name": "Customer Support",
"description": "Handles customer inquiries",
"status": "active",
"createdAt": "2025-01-15T10:00:00.000Z",
"updatedAt": "2025-01-20T14:30:00.000Z"
}
]curl -X GET {BASE_URL}/api/flows \
-b cookies.txt/api/conversationsList ConversationsRetrieve all conversations for the authenticated user with optional statistics.
[
{
"id": "conv-uuid",
"waPhoneNumber": "+972501234567",
"customerName": "John Doe",
"flowId": "flow-uuid",
"status": "active",
"lastMessage": "Hello, I need help",
"startedAt": "2025-01-20T10:00:00.000Z",
"lastCustomerMessageAt": "2025-01-20T14:30:00.000Z"
}
]curl -X GET "{BASE_URL}/api/conversations?limit=50" -b cookies.txt/api/conversations/{id}/replySend Message to CustomerSend a WhatsApp message to a customer within a conversation. Supports text, images, video, documents, and templates. Enforces WhatsApp 24-hour messaging window rules.
// Text message:
{
"messageType": "text",
"text": "Hello! How can I help you?"
}
// Image message:
{
"messageType": "image",
"mediaUrl": "https://your-domain.com/uploads/photo.jpg",
"caption": "Here is the information you requested"
}
// Template message (use after 24-hour window):
{
"messageType": "template",
"templateName": "order_update",
"templateLanguage": "en",
"templateParams": ["ORD-12345", "Shipped"]
}{
"success": true,
"messageId": "wamid.xxx",
"windowOpen": true
}# Send text message
curl -X POST {BASE_URL}/api/conversations/CONV_ID/reply \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{"messageType": "text", "text": "Hello! How can I help?"}'
# Send template (after 24h window)
curl -X POST {BASE_URL}/api/conversations/CONV_ID/reply \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"messageType": "template",
"templateName": "order_update",
"templateLanguage": "en",
"templateParams": ["ORD-123", "Shipped"]
}'/api/flows/generateGenerate Flow with AIUse AI to automatically generate a complete WhatsApp flow from a text description, PDF document, or image. This powers the AI Flow Generator feature.
// multipart/form-data:
// - prompt: "Create a customer support flow for a pizza restaurant"
// - file: (optional) PDF or image file{
"success": true,
"flow": {
"id": "new-flow-uuid",
"name": "Pizza Support Flow",
"status": "draft",
"drawflowData": {...}
},
"nodeCount": 8,
"message": "Flow generated with 8 nodes"
}# Text prompt
curl -X POST {BASE_URL}/api/flows/generate \
-b cookies.txt \
-F 'prompt=Create a customer support flow for a pizza restaurant'
# With PDF document
curl -X POST {BASE_URL}/api/flows/generate \
-b cookies.txt \
-F 'prompt=Build a flow from this document' \
-F 'file=@/path/to/document.pdf'{
"error": "Human-readable error message"
}