Limited Time: Start your 14-day free trial, no credit card required
Back to Blog
Tutorials

WhatsApp API Integration Guide: Connect WhatsApp to Any App

Walytic TeamApril 8, 202611 min read

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

  1. Sign up at app.walytic.com
  2. Connect your WhatsApp number (scan QR code)
  3. Navigate to Settings > API Keys
  4. Generate a new API key
  5. Copy your API key and instance ID

Sending a Text Message

bash
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)

bash
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)

bash
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

bash
curl -X GET https://api.walytic.com/api/messages/MSG_ID_HERE/status \
  -H "Authorization: Bearer YOUR_API_KEY"

Response:

json
{
  "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

EndpointRate LimitNotes
Send message60 requests/minPer instance
Broadcast10 requests/minBuilt-in throttling
Get status120 requests/minPer instance
Contacts60 requests/minCRUD 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

  1. In your Walytic dashboard, go to Settings > Webhooks
  2. Enter your webhook endpoint URL (e.g., `https://yourapp.com/webhooks/walytic`)
  3. Select the events you want to receive
  4. Save and test with the "Send Test Event" button

Available Webhook Events

EventTriggerUse Case
`message.received`Incoming message from contactRoute to support, trigger chatbot
`message.sent`Message successfully sentUpdate CRM record
`message.delivered`Message delivered to deviceDelivery confirmation
`message.read`Message read by recipientEngagement tracking
`message.failed`Message delivery failedRetry or alert
`contact.opted_out`Contact unsubscribedUpdate CRM, stop sequences
`instance.connected`WhatsApp connection establishedHealth monitoring
`instance.disconnected`WhatsApp connection lostAlert ops team

Example Webhook Payload

When a customer sends a message to your WhatsApp number, your endpoint receives:

json
{
  "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)

javascript
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 orderSend WhatsApp confirmationOrder notifications
New Google Form submissionSend WhatsApp welcome messageLead onboarding
New HubSpot deal stage changeSend WhatsApp updateSales pipeline
New Stripe paymentSend WhatsApp receiptPayment confirmation
New Calendly bookingSend WhatsApp reminderAppointment scheduling
Row added to Google SheetSend WhatsApp messageBulk outreach from spreadsheet

Setting Up a Zapier Integration

  1. Sign up for Zapier at zapier.com (free tier available)
  2. Create a new Zap: click "Create Zap"
  3. Choose your trigger app: e.g., Shopify "New Order"
  4. Choose Walytic as the action app: search for "Walytic"
  5. Select "Send WhatsApp Message" as the action
  6. Connect your Walytic account: enter your API key
  7. Map fields: map the customer phone number, name, and order details to the message template
  8. 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

FeatureZapierMake
Visual workflow builderLinearVisual canvas with branching
Operations per runLimitedHigher limits
Error handlingBasicAdvanced (routes, filters)
Data transformationLimitedBuilt-in functions
PricingPer-taskPer-operation (often cheaper)
Complexity supportSimple automationsComplex multi-step workflows

Example Make Scenario: Multi-Step Order Workflow

  1. Trigger: Webhook receives new order from your app
  2. Router: Branch based on order value

- Orders over $100 → Send personalized WhatsApp + assign VIP tag

- Orders under $100 → Send standard WhatsApp confirmation

  1. Action: Walytic "Send Message" module with dynamic content
  2. Action: Update CRM record with message status
  3. Error handler: If send fails, add to retry queue and notify ops team

Setting Up Make with Walytic

  1. Create a new scenario in Make
  2. Add an HTTP module or app-specific trigger
  3. Add the Walytic module: configure with your API key
  4. Build your workflow: add routers, filters, and transformations as needed
  5. Schedule and activate: set your scenario to run on schedule or in real-time

Choosing the Right Integration Method

CriteriaREST APIWebhooksZapierMake
Technical skill requiredHighHighLowMedium
FlexibilityMaximumEvent-drivenModerateHigh
Setup timeHoursHoursMinutes30 minutes
Best forCustom appsReal-time eventsSimple automationsComplex workflows
CostFree (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