Skip to main content

Webhooks

Webhooks let you receive real-time HTTP notifications on your server whenever something happens in your Waplify account — a message gets delivered, a customer replies, a campaign completes, etc.

How webhooks work

  1. You register a webhook endpoint (a URL on your server) in the Waplify dashboard
  2. You choose which events to subscribe to
  3. When an event occurs, Waplify sends a POST request to your URL with the event data
  4. Your server processes the data and responds with a 200 status code

Setting up webhooks

  1. Go to Developers > Webhooks in your Waplify dashboard
  2. Click Create Endpoint
  3. Enter your endpoint details:
SettingDescriptionDefault
NameA label for this endpoint
URLYour server URL (HTTPS required in production)
SecretOptional signing secret for payload verification
EventsWhich event types to receiveAll events
Retry countMax retry attempts on failure (0–10)3
TimeoutRequest timeout in seconds (1–30)5

Available events

EventDescription
message.sentMessage was accepted by WhatsApp
message.deliveredMessage was delivered to the recipient's device
message.readRecipient read the message
message.failedMessage delivery failed
button.clickedRecipient clicked a quick-reply or call-to-action button
message.receivedNew inbound message from a contact
message.replyContact replied to one of your outbound messages

Delivery behavior

All webhook payloads are sent as POST requests with:

  • Content-Type: application/json
  • User-Agent: Waplify-Webhook/1.0

Retry policy

ScenarioBehavior
2xx responseSuccess — no retry
4xx error (except 429)Not retried — fix your endpoint
429 Too Many RequestsRetried up to retry_count times
5xx errorRetried up to retry_count times
TimeoutRetried up to retry_count times

Retries use exponential backoff — each retry waits longer than the last: 1 second, then 2 seconds, then 4 seconds, then 8 seconds, and so on. This gives your server time to recover if it's temporarily overloaded.

Request headers

Every webhook request includes these headers:

HeaderDescription
Content-Typeapplication/json
User-AgentWaplify-Webhook/1.0
X-Webhook-SignatureHMAC-SHA256 signature (only if you configured a secret)

Status flow

Message statuses follow a strict order. Only forward transitions trigger webhooks:

pending → accepted → sent → delivered → read → clicked
↘ failed (can happen at any point after accepted)

If a message jumps from accepted to delivered, you will receive both message.sent and message.delivered events.