WhatsApp API Integration Guide: Connect WhatsApp to Any App
Why Integrate WhatsApp with Your App?
WhatsApp is where your customers already spend their time. Integrating it into your existing systems, , means you can:
- Send automated notifications: order confirmations, shipping updates, appointment reminders
- Receive and respond to messages: route incoming WhatsApp messages to your support team or chatbot
- Trigger messages from events: new signup, abandoned cart, payment received, ticket created
- Sync contact data: keep your CRM and WhatsApp contacts in sync
- Build custom workflows: any event in your system can trigger a WhatsApp message
This guide covers four integration methods: REST API, webhooks, Zapier, and Make (Integromat). We include code examples and step-by-step instructions for each.
Integration Method 1: REST API (Direct)
The most powerful and flexible integration method. Walytic provides a RESTful API that lets you send messages, manage contacts, and control your WhatsApp connection programmatically.
Getting Your API Credentials
- Sign up at app.walytic.com
- Connect your WhatsApp number (scan QR code)
- Navigate to Settings > API Keys
- Generate a new API key
- Copy your API key and instance ID
Sending a Text Message
curl -X POST https://api.walytic.com/api/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"instanceId": "your-instance-id",
"to": "14155551234",
"type": "text",
"text": {
"body": "Hi John, your order #1234 has shipped! Track it here: https://track.example.com/1234"
}
}'Sending a Media Message (Image)
curl -X POST https://api.walytic.com/api/messages/send \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"instanceId": "your-instance-id",
"to": "14155551234",
"type": "image",
"image": {
"url": "https://example.com/product.jpg",
"caption": "Your order is packed and ready to ship!"
}
}'Sending to Multiple Contacts (Bulk)
curl -X POST https://api.walytic.com/api/messages/broadcast \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"instanceId": "your-instance-id",
"contacts": ["14155551234", "14155555678", "14155559012"],
"type": "text",
"text": {
"body": "Flash sale! 30% off everything for the next 48 hours. Shop now: https://shop.example.com"
},
"options": {
"delay": 10
}
}'Checking Message Status
curl -X GET https://api.walytic.com/api/messages/MSG_ID_HERE/status \ -H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"messageId": "MSG_ID_HERE",
"status": "delivered",
"to": "14155551234",
"sentAt": "2026-04-08T10:30:00Z",
"deliveredAt": "2026-04-08T10:30:02Z",
"readAt": "2026-04-08T10:31:15Z"
}API Rate Limits and Best Practices
| Endpoint | Rate Limit | Notes |
|---|---|---|
| Send message | 60 requests/min | Per instance |
| Broadcast | 10 requests/min | Built-in throttling |
| Get status | 120 requests/min | Per instance |
| Contacts | 60 requests/min | CRUD operations |
Best practices for API integration:
- Always handle rate limit responses (HTTP 429) with exponential backoff
- Use webhooks for delivery status updates instead of polling
- Store message IDs for tracking and debugging
- Validate phone numbers before sending (E.164 format)
For complete API reference, visit Walytic API documentation.
Integration Method 2: Webhooks (Event-Driven)
Webhooks let your application receive real-time notifications when events occur in WhatsApp: incoming messages, delivery confirmations, read receipts, and more.
Setting Up Webhooks
- In your Walytic dashboard, go to Settings > Webhooks
- Enter your webhook endpoint URL (e.g., `https://yourapp.com/webhooks/walytic`)
- Select the events you want to receive
- Save and test with the "Send Test Event" button
Available Webhook Events
| Event | Trigger | Use Case |
|---|---|---|
| `message.received` | Incoming message from contact | Route to support, trigger chatbot |
| `message.sent` | Message successfully sent | Update CRM record |
| `message.delivered` | Message delivered to device | Delivery confirmation |
| `message.read` | Message read by recipient | Engagement tracking |
| `message.failed` | Message delivery failed | Retry or alert |
| `contact.opted_out` | Contact unsubscribed | Update CRM, stop sequences |
| `instance.connected` | WhatsApp connection established | Health monitoring |
| `instance.disconnected` | WhatsApp connection lost | Alert ops team |
Example Webhook Payload
When a customer sends a message to your WhatsApp number, your endpoint receives:
{
"event": "message.received",
"timestamp": "2026-04-08T14:22:00Z",
"data": {
"instanceId": "your-instance-id",
"messageId": "MSG_ABC123",
"from": "14155551234",
"type": "text",
"text": {
"body": "Hi, I want to check my order status"
},
"contact": {
"name": "John Doe",
"pushName": "John"
}
}
}Webhook Handler Example (Node.js)
const express = require('express');
const app = express();
app.use(express.json());
app.post('/webhooks/walytic', (req, res) => {
const { event, data } = req.body;
switch (event) {
case 'message.received':
console.log(`New message from ${data.from}: ${data.text?.body}`);
// Route to your support system or trigger auto-reply
handleIncomingMessage(data);
break;
case 'message.delivered':
console.log(`Message ${data.messageId} delivered`);
// Update delivery status in your database
updateMessageStatus(data.messageId, 'delivered');
break;
case 'message.read':
console.log(`Message ${data.messageId} read`);
updateMessageStatus(data.messageId, 'read');
break;
case 'message.failed':
console.log(`Message ${data.messageId} failed`);
handleFailedMessage(data);
break;
}
res.status(200).send('OK');
});
app.listen(3000);Webhook Security
- Verify webhook signatures: Walytic signs each webhook request with a secret key. Always validate the signature before processing.
- Respond quickly: Return a 200 status within 5 seconds. Process heavy logic asynchronously.
- Handle retries: Failed webhooks are retried 3 times with exponential backoff. Make your handler idempotent.
Integration Method 3: Zapier (No-Code)
Zapier connects Walytic to 6,000+ apps without writing code. Perfect for non-technical teams that want to automate WhatsApp workflows.
Popular Zapier Integrations
| Trigger (When...) | Action (Then...) | Use Case |
|---|---|---|
| New Shopify order | Send WhatsApp confirmation | Order notifications |
| New Google Form submission | Send WhatsApp welcome message | Lead onboarding |
| New HubSpot deal stage change | Send WhatsApp update | Sales pipeline |
| New Stripe payment | Send WhatsApp receipt | Payment confirmation |
| New Calendly booking | Send WhatsApp reminder | Appointment scheduling |
| Row added to Google Sheet | Send WhatsApp message | Bulk outreach from spreadsheet |
Setting Up a Zapier Integration
- Sign up for Zapier at zapier.com (free tier available)
- Create a new Zap: click "Create Zap"
- Choose your trigger app: e.g., Shopify "New Order"
- Choose Walytic as the action app: search for "Walytic"
- Select "Send WhatsApp Message" as the action
- Connect your Walytic account: enter your API key
- Map fields: map the customer phone number, name, and order details to the message template
- Test and enable: send a test message and turn on the Zap
Example Zap: Shopify Order Confirmation
- Trigger: Shopify > New Order
- Action: Walytic > Send WhatsApp Message
- Message: "Hi ${{customerName}}, thank you for your order #${{orderNumber}}! We'll ship it within 24 hours. Track your order: ${{trackingLink}}"
Integration Method 4: Make (Advanced No-Code)
Make (formerly Integromat) offers more complex workflow capabilities than Zapier, including branching logic, error handling, and data transformation.
Why Choose Make Over Zapier
| Feature | Zapier | Make |
|---|---|---|
| Visual workflow builder | Linear | Visual canvas with branching |
| Operations per run | Limited | Higher limits |
| Error handling | Basic | Advanced (routes, filters) |
| Data transformation | Limited | Built-in functions |
| Pricing | Per-task | Per-operation (often cheaper) |
| Complexity support | Simple automations | Complex multi-step workflows |
Example Make Scenario: Multi-Step Order Workflow
- Trigger: Webhook receives new order from your app
- Router: Branch based on order value
- Orders over $100 → Send personalized WhatsApp + assign VIP tag
- Orders under $100 → Send standard WhatsApp confirmation
- Action: Walytic "Send Message" module with dynamic content
- Action: Update CRM record with message status
- Error handler: If send fails, add to retry queue and notify ops team
Setting Up Make with Walytic
- Create a new scenario in Make
- Add an HTTP module or app-specific trigger
- Add the Walytic module: configure with your API key
- Build your workflow: add routers, filters, and transformations as needed
- Schedule and activate: set your scenario to run on schedule or in real-time
Choosing the Right Integration Method
| Criteria | REST API | Webhooks | Zapier | Make |
|---|---|---|---|---|
| Technical skill required | High | High | Low | Medium |
| Flexibility | Maximum | Event-driven | Moderate | High |
| Setup time | Hours | Hours | Minutes | 30 minutes |
| Best for | Custom apps | Real-time events | Simple automations | Complex workflows |
| Cost | Free (with Walytic plan) | Free (with Walytic plan) | $0–$69/mo (Zapier) | $0–$29/mo (Make) |
Recommended Combinations
- E-commerce: Zapier (Shopify trigger) + Webhooks (delivery tracking)
- SaaS: REST API (programmatic sends) + Webhooks (reply handling)
- Agencies: Make (complex client workflows) + REST API (custom dashboards)
- Small business: Zapier only (simple, no-code automations)
Common Integration Patterns
Pattern 1: CRM Sync
Keep your CRM contacts and WhatsApp conversations in sync. When a contact is added or updated in your CRM, sync it to Walytic. When a WhatsApp conversation happens, log it in the CRM.
Pattern 2: E-Commerce Notifications
Trigger WhatsApp messages at each stage of the customer journey: order placed, payment confirmed, shipped, delivered, and follow-up review request.
Pattern 3: Support Ticket Routing
Route incoming WhatsApp messages to your helpdesk (Zendesk, Freshdesk, etc.) as new tickets. Send WhatsApp replies when agents respond.
Pattern 4: Scheduled Campaigns from Spreadsheets
Upload contacts and messages to a Google Sheet. Use Zapier or Make to read rows and send personalized WhatsApp messages on a schedule.
For more integration ideas, explore our use cases and feature overview.
Start Integrating WhatsApp Today
Whether you prefer code-first API integration or no-code tools like Zapier and Make, connecting WhatsApp to your existing systems takes minutes. Not months. Walytic's REST API, webhooks, and native integrations give you everything you need to build powerful WhatsApp workflows.
Start your free 14-day trial of Walytic . No credit card required. Get your API key, connect your WhatsApp number, and send your first API message in under 5 minutes.
Ready to Automate WhatsApp?
Start sending bulk messages, automate follow-ups, and build chatbots, all with flat-rate pricing. No per-message fees.
Start Free 14-Day Trial