Summary

Webhooks in Wati allow you to receive real-time updates about messages and their statuses by sending event data to your server. This guide explains what events you can track, how to set up a webhook, and how session-based callbacks work so you can reliably process message activity in your system.

Instructions

What events can Wati webhooks capture?

Wati webhooks notify your external system when specific events occur in your Wati account. When an event occurs, Wati sends a callback payload to the webhook URL you configured. Your system can use this information to track messages, monitor message statuses, and stay updated on WhatsApp account changes.

Wati supports the following webhook events:

Message and conversation events

  • Message Received – When a customer sends a message.

  • New Contact Message – When a new contact sends a message.

  • Session Message Sent – When a session message is sent.

  • Template Message Sent – When a template message is sent.

  • Sent Message is DELIVERED – When a sent message is delivered.

  • Sent Message is Read – When a sent message is read.

  • Sent Message is REPLIED – When a customer replies to a sent message.

  • Session Message Failed – When a session message fails to send.

  • Template Message FAILED – When a template message fails to send.

Template events

  • Template Status Update – When a template's status changes.

  • Template Quality Update – When a template's quality rating changes.

  • Template Category Update – When a template's category changes.

WhatsApp account and phone number events

  • WhatsApp Account Review Updated – When the review status of a WhatsApp account changes.

  • Phone Number Quality Update – When a phone number's quality rating changes.

  • WABA Account Deleted – When a WhatsApp Business Account (WABA) is deleted.

  • WABA Account Content Updated – When the content of a WABA is updated.

  • Phone Number Deleted – When a phone number is deleted.

  • Business Capability Updated – When a business capability is updated.

Other events

  • Chatbot Triggered – When a chatbot is triggered.

  • CTA URL Clicked – When a customer clicks a CTA URL.

  • CTA Button Clicked (BSUID) – When a customer clicks a CTA button.

  • Call Status – When a WhatsApp call status changes.

  • Contact Request Response – When a customer responds to a contact request.

  • WhatsApp Payment Captured – When a WhatsApp payment is captured.

Additional webhook events for BSUID

Wati also supports additional webhook events for BSUID (Business-Scoped User ID).

These include:

  • Message Received (BSUID)

  • New Contact Message (BSUID)

  • Session Message Sent (BSUID)

  • Session Message Sent v2 (BSUID)

  • Template Message Sent (BSUID)

  • Template Message Sent v2 (BSUID)

  • Chatbot Triggered (BSUID)

  • CTA Button Clicked (BSUID)

  • Call Status (BSUID)

For details about individual events and their callback payloads, see our webhook documentation.

How to add a webhook in Wati

Follow these steps to set up a webhook:

  • Log in to your Wati dashboard.

  • Go to Connectors and click on Webhooks.

  • Click Add Webhook.

  • Enter your full webhook URL.

  • Set the status to Enabled. Webhook statuses can be Enabled, Disabled and Defective.

  • Select the events you want to capture.

  • Click Save.

How to test your webhook

After adding the webhook, you can test the connection:

  • Use the Trigger sample callback option.

  • Wati will send a sample payload to your webhook URL.

  • Verify that your server receives and processes the payload correctly.

Understanding session-based webhooks

In the WhatsApp Business API, conversations are tracked as 24-hour sessions. A session starts when a business message is delivered.

Types of sessions

  • Active session

    • Both the business and the customer have exchanged at least one message.

    • Example: A business sends a template message and the customer replies.

  • Inactive session

    • Only one party has sent a message, and the other has not responded.

    • Example: A business sends a template message, but the customer does not reply.

Note: Webhook callbacks may vary depending on whether the session is active or inactive.

Webhook response and retry logic

To ensure reliable delivery, your webhook must respond correctly.

  • Your server must return a 200 OK response to confirm that the event was received.

  • If a 200 response is not received:

    • Wati retries sending the event.

    • Retries can happen up to 144 times.

    • Retry attempts run at 10-minute intervals.

  • If there are more than 100 consecutive failures:

    • The webhook is marked as Defective.

    • You will receive an email notification.

If all retry attempts fail, the event will no longer be sent.

Best practices

  • Ensure your webhook endpoint is always available and responsive.

  • Log incoming payloads for easier debugging.

  • Handle duplicate events, as retries may send the same payload more than once.

  • Validate incoming requests to ensure they originate from Wati.

This setup helps you keep your systems in sync with real-time messaging activity in Wati.

Frequently Asked Questions (FAQs)

Webhook events and configuration

1. What types of events can Wati webhooks capture?

Wati webhooks can capture message and conversation events, template events, WhatsApp account and phone number events, and other events. When a supported event occurs, Wati sends a callback payload to your configured webhook URL.

2. What webhook statuses are available in Wati?

Wati supports three webhook statuses:

  • Enabled – The webhook is enabled.

  • Disabled – The webhook is disabled.

  • Defective – The webhook has been marked as defective after repeated delivery failures.

3. Does Wati support additional webhook events for BSUID?

Yes. Wati supports additional webhook events for Business-Scoped User ID (BSUID). Refer to the webhook documentation for details about individual BSUID events and their callback payloads.

Session-based webhooks

4. What is the difference between an active session and an inactive session?

An active session occurs when both the business and the customer have exchanged at least one message.

An inactive session occurs when only one party has sent a message and the other party has not responded.

5. Do webhook callbacks vary between active and inactive sessions?

Yes. Webhook callbacks may vary depending on whether the WhatsApp session is active or inactive. A WhatsApp session starts when a business message is delivered and lasts for 24 hours.

Webhook response and troubleshooting

6. What happens if my webhook endpoint does not return a 200 OK response?

Your server must return a 200 OK response to confirm that it has received a webhook event. If Wati does not receive this response, it retries sending the event up to 144 times at 10-minute intervals.

If there are more than 100 consecutive failures, Wati marks the webhook as Defective and sends an email notification. If all retry attempts fail, Wati stops sending the event.

7. How can I improve webhook reliability?

Keep your webhook endpoint available and responsive, log incoming callback payloads for easier debugging, handle duplicate events to avoid processing the same payload multiple times, and validate incoming requests to ensure they originate from Wati.

Did this answer your question?