Skip to main content
A webhook is an HTTP endpoint on your server that Meta calls with a JSON payload whenever something happens on WhatsApp — an incoming message, a delivery or read receipt, a template approval or rejection. Unlike the API (where you call Meta), webhooks are Meta calling you.
Customer sends "Hello"

Meta's servers receive it

Meta POSTs JSON to your webhook URL

Your server receives the payload

Your code decides what to do (reply, log, trigger bot, etc.)

The difference between the API and webhooks

APIWebhook
DirectionYou → MetaMeta → You
UseSend messages, upload mediaReceive messages, status updates
TriggerYou call itMeta calls it when something happens

What webhooks notify you about

Incoming message from a customer:
{
  "messages": [{
    "from": "919959623255",
    "type": "text",
    "text": { "body": "Hello" }
  }]
}
Message delivered / read / failed:
{ "statuses": [{ "status": "delivered" }] }
{ "statuses": [{ "status": "read" }] }
{ "statuses": [{ "status": "failed" }] }

What your server can do with the data

Your server receives the JSON and can choose to:
  • Show the message on a dashboard
  • Save it to a database (MySQL, Google Sheets, Airtable)
  • Forward it to an automation tool (n8n, Zapier)
  • Trigger an AI bot to generate a reply
  • Send an automatic response back via the API

Setting up a webhook

You need an HTTPS endpoint at a public URL, e.g. https://yourdomain.com/webhook. Register this URL in Meta’s App Dashboard under WhatsApp → Configuration → Webhook. Meta will verify the endpoint with a GET request before activating it.

Frequently asked

It’s an HTTPS endpoint on your server that Meta calls with a JSON payload when something happens — a customer sends a message, a delivery status changes, or a template is approved/rejected. You register the URL in the Meta dashboard.
Set up a webhook endpoint. When a customer sends a message, Meta POSTs the message data to your webhook URL. Your server processes the JSON and can trigger a reply via the send-message API.
Meta sends a statuses event to your webhook with "status": "delivered" or "status": "read" when those events occur.
WhatsApp blocked the marketing message because the recipient has already received too many marketing messages — their per-user marketing cap was hit. You cannot override this — wait and try again later, or use a Utility template if the content qualifies.

Gotchas & common mistakes

  • The webhook does not send messages to the customer’s phone — it only delivers JSON data to your server. Your code must call the Messages API separately to send a reply.
  • Webhook URL must be HTTPS — plain HTTP is not accepted by Meta.
  • Meta sends a verification GET request first — your endpoint must handle the hub.verify_token challenge before Meta activates the webhook.
  • Statuses and messages come in the same webhook — your code needs to check whether the payload contains messages (incoming) or statuses (delivery events).