Webhooks push events to your server in real time: inbound messages from customers, and status updates (sent, delivered, read) for messages you sent. You host an endpoint that accepts POST requests, and the platform calls it on each event.
During setup, your server URL is sent a verification request with a challenge query parameter. Your endpoint must respond with that exact value, or webhook verification will fail silently.
// PHP
<?php
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (isset($_GET['challange'])) {
echo $_GET['challange'];
} else {
echo "no challange";
}
}
?>
// Node.js
app.get('/your_webhook_endpoint', (req, res) => {
try {
res.send(req.query['challange']);
} catch (error) {
res.send(error.message);
}
});When a customer messages you, your endpoint receives a JSON body with the sender and the message content.
{
"object": "whatsapp_business_account",
"entry": [{
"changes": [{
"value": {
"messaging_product": "whatsapp",
"messages": [{
"from": "919867800451",
"id": "wamid.HBgL...",
"type": "text",
"text": { "body": "Hi, is this available?" }
}]
}
}]
}]
}For messages you sent, status events tell you when they were delivered or read, keyed by the message ID (WAMID) from the send response.
Your endpoint should reply 200 quickly and process the event asynchronously. Slow responses can cause retries.
Prefer no code? The automation builder catches inbound events without you hosting anything. See the webhook trigger guide.
Building an integration? If you hit a wall, message us and a developer will help, the only platform in India that answers you live on WhatsApp.
Ask us on WhatsApp