API v1.0

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.

WhatsApp Setup

Connect your official Meta WhatsApp Business Account to WhatsFlow AI using simple technical steps to unlock automated conversation pipelines.

1

Gather Meta Credentials

Locate your credentials inside the Meta Developer Dashboard under "WhatsApp > API Setup".

  • Phone Number ID
  • WhatsApp Business Account ID
  • System User Access Token
2

Submit API Connection

Send an authorized request to bind your Meta credentials securely to WhatsFlow.

POST /api/whatsapp/connect
{
  "phone_number_id": "1059...",
  "business_account_id": "8842...",
  "access_token": "EAAGZ..."
}
3

Register Callback Webhook

Enter the global WhatsFlow listener into Meta webhook config so the AI sees incoming texts:

https://api.whatsflow.ai/v1/whatsapp/webhook

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_KEY

Send 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/send

Example 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 TypeDescription
message.receivedTriggered whenever a customer sends you a text.
message.deliveredSent when your outgoing message is delivered (double tick).
lead.qualifiedTriggered when the AI successfully qualifies a lead.
appointment.bookedSent when a customer completes a booking through AI.