Oops! Facing network problem. Unable to load this page. Refresh
SPRL

Just a moment...

Hello Guest

logo

FAQs

Help Center

WhatsApp Business API

WhatsApp API Webhooks

Receive delivery events and automate workflows.

Overview

WhatsApp API Webhooks allow your application to receive real-time updates whenever important WhatsApp events occur. Instead of continuously checking the API for changes, your application automatically receives event notifications at a secure webhook URL.

SPRL allows you to configure individual webhooks for each connected WhatsApp Business account. You can configure a separate webhook endpoint, generate a webhook secret, choose the events you want to receive, and enable or disable notifications independently for each account.

Each WhatsApp account maintains its own webhook configuration and delivery history.

Good to Know:
Webhook configuration is available on supported subscription plans. Your webhook endpoint should be publicly accessible and able to receive HTTPS POST requests.

Open Webhook Settings

  1. Navigate to Dashboard → WhatsApp → Webhook.
  2. Open the Webhook Configuration page.
  3. Select the WhatsApp Business account you want to configure.
  4. Enter your webhook information.
  5. Select the events you want to receive.
  6. Enable webhook notifications.
  7. Save your configuration.

Important: Each connected WhatsApp account has a separate webhook configuration. Changes made to one account do not affect the webhook settings of another account.


Select a WhatsApp Account

Before configuring a webhook, select the appropriate connected WhatsApp Business account from the account selector.

The selector displays the account's WhatsApp Business Account name and registered phone number.

For example, if you have multiple connected WhatsApp accounts, you can configure:

  • Account A: Its own webhook URL and secret key.
  • Account B: A different webhook URL and secret key.
  • Account C: Its own selected events and notification status.

Each account's webhook settings, delivery attempts and logs are maintained independently.


Webhook Configuration

Configure the following settings for the selected WhatsApp account.

SettingDescription
Webhook NameA descriptive name for the webhook configuration.
Webhook URLThe HTTPS endpoint that will receive webhook events.
Secret KeyUsed to verify webhook requests using HMAC SHA256 signatures.
GenerateCreates a secure webhook secret automatically.
StatusEnables or disables webhook notifications for the selected account.
EventsAllows you to select which WhatsApp events should trigger webhook notifications.

Secret Key: Keep your secret key confidential. Your application needs the same secret key to verify incoming webhook signatures.


Available Webhook Events

Choose the events that your application should receive for the selected WhatsApp account.

EventDescription
Message ReceivedTriggered when a customer sends a message.
Message SentTriggered after a message has been sent.
Message DeliveredTriggered when message delivery is confirmed.
Message ReadTriggered when a recipient reads a message.
Message FailedTriggered if message delivery fails.
Message RepliedTriggered when a customer replies.
Conversation StartedTriggered when a new conversation begins.
Template ApprovedTriggered when a template is approved.
Template RejectedTriggered when a template is rejected.
Template PausedTriggered when a template is paused.
Template DisabledTriggered when a template is disabled.

Only the events selected in the webhook configuration are eligible for delivery.


Webhook Security

Every webhook request includes security headers that your application can use to verify the authenticity of the request.

HeaderPurpose
Content-TypeIdentifies the request format as JSON.
User-AgentIdentifies the webhook sender as SPRL.
X-Webhook-EventSpecifies the event type being delivered.
X-Webhook-SignatureContains the HMAC SHA256 signature used to verify the request.

Signature Verification

SPRL generates an HMAC SHA256 signature using the configured Secret Key and the JSON request body.

Your application should:

  1. Read the raw JSON request body.
  2. Calculate the HMAC SHA256 signature using the configured Secret Key.
  3. Compare the calculated signature with the value received in X-Webhook-Signature.
  4. Process the request only after successful verification.

The signature header follows this format:

sha256=YOUR_GENERATED_SIGNATURE

Always verify the signature before processing webhook events.


Test Your Webhook

Before relying on webhook notifications, you can test the configuration for the selected WhatsApp account.

  1. Open the Webhook Configuration page.
  2. Select the WhatsApp account you want to test.
  3. Ensure the webhook URL is configured and webhook notifications are enabled.
  4. Click Test Webhook.
  5. Check the response to confirm whether the endpoint received the test event.

The test generates a webhook.test event and sends it to the configured endpoint.

You can review the test delivery result in the Delivery Logs section.


Webhook Status

The Webhook Status panel provides information about the webhook configuration for the currently selected WhatsApp account.

Status ItemDescription
Last TestedMost recent webhook test.
Last SuccessMost recent successful webhook delivery.
Last FailureMost recent failed webhook request.
Failure CountNumber of failed webhook deliveries.

Use this information to monitor the delivery health of each connected WhatsApp account.


Delivery Logs

SPRL maintains delivery logs for webhook requests so you can review the delivery history of each connected WhatsApp account.

Navigate to Dashboard → WhatsApp → API → Delivery Logs.

Select the WhatsApp account to view its corresponding webhook delivery history.

Available Log Information

InformationDescription
EventEvent associated with the webhook request.
Destination URLWebhook endpoint receiving the request.
HTTP CodeHTTP response code returned by your endpoint, when available.
StatusIndicates whether the delivery succeeded or failed.
Response TimeTime taken to receive the endpoint response.
AttemptsNumber of HTTP delivery attempts made.
DateDate and time of the delivery attempt.
DetailsAllows you to inspect request and response information.

Filter Delivery Logs

You can filter delivery logs using the following options:

  • Date Range: View delivery attempts within a selected date range.
  • Event Type: Filter logs by a specific webhook event.
  • Status: Filter successful, failed or pending deliveries.

Click View to inspect the request headers, request payload and response body associated with a delivery attempt.

Important:
Delivery Logs are maintained separately for each WhatsApp account. Selecting a different account displays that account's delivery history.

Webhook Requirements

  • Your webhook URL should use HTTPS.
  • Your endpoint should accept HTTP POST requests.
  • Your endpoint should be publicly accessible.
  • Your application should validate webhook signatures using the configured Secret Key.
  • Your endpoint should return a successful HTTP 2xx response after processing a request.
  • Save your configuration after changing events or settings.
  • Ensure the webhook is enabled for the WhatsApp account from which you expect events.

Best Practices

  • Generate a strong Secret Key and keep it confidential.
  • Configure a separate webhook endpoint where required for different WhatsApp accounts.
  • Enable only the webhook events your application requires.
  • Always verify webhook signatures before processing requests.
  • Process incoming webhook events efficiently.
  • Monitor Delivery Logs for failed requests.
  • Use HTTPS to protect webhook traffic.
  • Test your endpoint after configuring or updating webhook settings.

Troubleshooting

My application isn't receiving webhook events

Verify that you have selected the correct WhatsApp account, webhook notifications are enabled, the required events are selected, and your endpoint is publicly accessible.

Webhook requests are failing

Check whether your endpoint is returning an appropriate HTTP response. Review the HTTP response code, response body and response time in Delivery Logs.

Signature verification is failing

Ensure your application uses the correct Secret Key for the selected WhatsApp account and calculates the HMAC SHA256 signature using the original raw JSON request body.

I am not receiving every event

Confirm that the required event checkboxes are selected and saved for the correct WhatsApp account.

I am seeing logs for another WhatsApp account

Use the account selector on the Delivery Logs page to select the correct WhatsApp Business account. Each account has its own delivery history.

My webhook test is failing

Verify the webhook URL, endpoint accessibility, HTTPS configuration and your endpoint's HTTP response. Check the corresponding webhook.test entry in Delivery Logs for additional information.


Frequently Asked Questions

Can I configure multiple webhooks?

Yes. You can configure one webhook for each connected WhatsApp Business account.

Does each WhatsApp account have a separate Secret Key?

Yes. Each account maintains its own webhook configuration and Secret Key.

Can I choose which events I receive?

Yes. You can select individual message, conversation and template events for each WhatsApp account.

Can I use different webhook URLs for different accounts?

Yes. Each connected WhatsApp account can have its own webhook URL.

How can I test whether my webhook is working?

Use the Test Webhook option on the Webhook Configuration page. You can then review the test result in Delivery Logs.

Where can I find webhook delivery history?

Navigate to Dashboard → WhatsApp → API → Delivery Logs and select the relevant WhatsApp account.

What happens if I disable a webhook?

New webhook events will not be dispatched while the webhook is disabled. You can enable it again from the Webhook Configuration page.


Learn More:
Continue with WhatsApp Pricing & Conversation Charges to understand subscription plans, Meta conversation pricing, and how WhatsApp billing works.
Tip: Configure and test each WhatsApp account independently. Subscribe only to the events your application actually needs to reduce unnecessary processing and simplify integration management.

Need more help?

Our support team is always happy to assist you.

×

We use cookies to improve your experience, analyse traffic, and personalise content. By clicking “Accept”, you consent to the use of cookies as described in our Cookie Policy .

Accept cookies Read our Cookie Policy