Real-Time Inbound Event Engine

WhatsApp Webhook API.

Stream incoming customer messages and delivery events directly to your HTTPS endpoint to power automated chatbots, AI agents, and customer support desks.

What is a WhatsApp Webhook?

A WhatsApp Webhook is an HTTP callback. Whenever a customer sends a message or media to your connected WhatsApp phone number, Wapix immediately triggers an HTTP POST request containing the sender's phone number, message text, and timestamp to your designated server URL.

ProtocolHTTPS POST
Payload FormatJSON Body
Setup LocationDashboard Webhooks
Secret SecuritySupported

Inbound Webhook Payload Example

// Delivered to your webhook endpoint via POST
{
  "event": "message",
  "session": "sess_default_991",
  "data": {
    "from": "919876543210@c.us",
    "to": "918000000000@c.us",
    "body": "Hi, I would like to check the status of my order #8491",
    "timestamp": 1728220100,
    "hasMedia": false
  }
}

Express.js Webhook Consumer Example

import express from "express";
import axios from "axios";

const app = express();
app.use(express.json());

app.post("/api/whatsapp/webhook", async (req, res) => {
  const { event, data } = req.body;

  if (event === "message" && data?.body) {
    const sender = data.from.replace("@c.us", "");
    const userMessage = data.body;

    console.log(`Received message from ${sender}: ${userMessage}`);

    // Auto-reply logic or AI Agent routing
    if (userMessage.toLowerCase().includes("status")) {
      await axios.post("https://api.wapix.sbs/api/v1/send/message", {
        service: "message",
        whatsaap_number: sender,
        text: "Your order is currently out for delivery! Expected by 5:00 PM.",
        api_key: process.env.WAPIX_API_KEY
      });
    }
  }

  // Acknowledge receipt promptly
  return res.status(200).json({ received: true });
});

app.listen(3000, () => console.log("Webhook receiver online on port 3000"));

Build conversational automation with webhooks