Overview
ChatFlow provides a REST API that allows developers to integrate ChatFlow's WhatsApp messaging capabilities into their own applications, websites, or business systems.
Who Should Use the API?
The ChatFlow API is intended for:
- Developers building custom integrations
- Businesses that want to automate messaging from their own systems
- Teams integrating ChatFlow with CRM, ERP, or e-commerce platforms
Getting Your API Key
2. Go to Settings in the left sidebar
3. Click on API or Developer Settings
4. Click Generate API Key or Copy API Key
5. Store your API key securely - do not share it publicly
API Base URL
All API requests should be made to:
Authentication
Include your API key in the request header:
Authorization: Bearer YOUR_API_KEY
Common API Endpoints
Send a Message:
POST /api/v1/messages/send
Body: { "phone": "+91XXXXXXXXXX", "message": "Hello from ChatFlow" }
Get Contacts:
GET /api/v1/contacts
Add a Contact:
POST /api/v1/contacts
Body: { "name": "John Doe", "phone": "+91XXXXXXXXXX", "email": "
john@example.com" }
Get Campaign List:
GET /api/v1/campaigns
Create a Campaign:
POST /api/v1/campaigns
Body: { "name": "Promo Campaign", "template": "template_name", "contacts": ["id1", "id2"] }
Rate Limits and Usage
- API rate limits depend on your subscription plan
- Check your dashboard for current API usage and limits
- Exceeding limits may result in temporary throttling
Error Handling
Common HTTP response codes:
- 200: Success
- 400: Bad Request - check your request parameters
- 401: Unauthorized - verify your API key
- 429: Too Many Requests - rate limit exceeded
- 500: Server Error - contact support
Best Practices
- Never expose your API key in client-side code
- Use environment variables to store your API key
- Implement retry logic for failed requests
- Test integrations in a development environment before going live