API Reference
The WhatsFlow AI API allows you to programmatically manage your WhatsApp conversations, leads, and automation workflows. Integrate WhatsFlow directly into your own applications, CRM, or custom tools.
Authentication
All API requests must include your API Key in the Authorization header. You can find your API key in the Dashboard under Settings.
HTTP Header
Authorization: Bearer YOUR_API_KEYSend Message
Trigger an outgoing WhatsApp message to a specific phone number. You can send plain text, template messages, or even media files.
POST
/v1/messages/sendExample Request (cURL)
curl -X POST https://api.whatsflow.ai/v1/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "15551234567",
"text": "Hello from API!"
}'Example Response
{
"id": "msg_59283",
"status": "sent",
"timestamp": "2025-05-18T12:00:00Z"
}Lead Management
Retrieve and manage lead information programmatically. Sync WhatsFlow leads with your internal CRM in real-time.
GET
/v1/leads/{lead_id}{
"id": "lead_9283",
"name": "Alex Johnson",
"phone": "+1 555-0192",
"status": "qualified",
"intent_score": 0.94
}Webhooks
Receive real-time notifications about incoming messages, status updates, and lead activities. Configure your webhook URL in the developer settings.
| Event Type | Description |
|---|---|
message.received | Triggered whenever a customer sends you a text. |
message.delivered | Sent when your outgoing message is delivered (double tick). |
lead.qualified | Triggered when the AI successfully qualifies a lead. |
appointment.booked | Sent when a customer completes a booking through AI. |
