Skip to main content

Webhooks

Webhooks let EzPulze notify your system in real time when events happen — like a customer sending a message, reading your reply, or a message failing to deliver. Instead of constantly checking for updates, your system receives an instant HTTP notification the moment something occurs.

📸
Screenshot: Webhooks list page showing table with webhook name, URL, event chips, status toggle, created date, and actions menu
webhooks-list.png
1. Go to Developer Tools → Webhooks from the sidebar
2. Capture the full page showing the webhooks table with several webhooks in different states
Save to: static/img/screenshots/developer-tools/webhooks/webhooks-list.png

Webhooks list

The list page shows all your webhook subscriptions:

ColumnDescription
NameWebhook name
Webhook URLThe endpoint URL (truncated — hover to see the full URL)
EventsEvent chips showing subscribed events (first 2 shown, then "+X more")
StatusToggle switch to enable/disable the webhook
CreatedCreation date
ActionsMenu with Edit, Test, View Logs, Copy Secret, Delete

Actions

ActionDescription
EditChange the webhook name, URL, events, or settings
TestSend a test payload to verify your endpoint is working
View LogsSee delivery history — which events were sent and whether they succeeded
Copy SecretCopy the secret key for signature verification
DeletePermanently remove the webhook

Creating a webhook

Click the Add Webhook button to open the creation dialog.

📸
Screenshot: Create Webhook dialog showing name field, URL field, event checkboxes, auto-generated secret key with copy button, and advanced settings with retry count and timeout
create-webhook-dialog.png
1. Click "Add Webhook"
2. Fill in the name and URL
3. Select 2-3 events
4. Show the auto-generated secret key
5. Expand Advanced Settings to show retry and timeout options
6. Capture the full dialog
Save to: static/img/screenshots/developer-tools/webhooks/create-webhook-dialog.png

Webhook fields

FieldRequiredDescription
Webhook NameYesA descriptive name (e.g., "CRM Sync", "Order Notifications") — max 255 characters
Webhook URLYesYour endpoint URL (must be https://) — e.g., https://myapp.com/webhooks/ezchat
EventsYesSelect at least one event to subscribe to (see Events below)

Secret key

When you create a webhook, a secret key is automatically generated. This key is used to verify that incoming webhook requests genuinely come from EzPulze (see Security).

📸
Screenshot: Secret key section showing the masked key with show/hide toggle, copy button, regenerate button, and warning message
secret-key-section.png
1. In the Create Webhook dialog, capture the secret key section showing the key, copy button, and regenerate button
Save to: static/img/screenshots/developer-tools/webhooks/secret-key-section.png
Save your secret key

The secret key is only shown once when creating the webhook. Copy it and store it securely. You'll need it to verify webhook signatures.

Advanced settings

Expand the Advanced Settings panel for additional configuration:

SettingDescriptionDefaultRange
Retry CountNumber of retry attempts if delivery fails30–5
TimeoutHow long to wait for your server to respond (in milliseconds)5,000 ms1,000–30,000 ms
ActiveWhether the webhook is enabledOn

Events

You can subscribe to one or more of these events:

EventDescriptionWhen it fires
Message ReceivedA customer sent a message to your WhatsApp numberInstantly when a new message arrives
Message SentA message was successfully sent from EzPulzeAfter EzPulze sends a message (broadcast, chatbot, or manual)
Message DeliveredA message was delivered to the customer's phoneWhen WhatsApp confirms delivery (double check marks)
Message ReadA customer opened and read your messageWhen WhatsApp confirms the message was read (blue check marks)
Message FailedA message failed to sendWhen WhatsApp returns an error for a message

Event payload

Every webhook delivery sends a JSON payload with this structure:

{
"event": "message.received",
"timestamp": "2026-01-15T10:30:00.000Z",
"data": {
"messageId": "wamid.abc123...",
"from": "919876543210",
"to": "919876543211",
"contactName": "John Doe",
"type": "text",
"text": "Hi, I want to know about your services",
"timestamp": "2026-01-15T10:30:00.000Z"
}
}

The data object varies by event type — for example, Message Sent includes templateName and campaignName, while Message Failed includes errors with error details.


Testing a webhook

Click Test from the actions menu to send a sample payload to your endpoint. This helps verify that:

  • Your URL is reachable
  • Your server processes the payload correctly
  • Signature verification is working

The test sends a sample message.received event payload.


Delivery logs

Click View Logs to see the delivery history for a webhook.

📸
Screenshot: Delivery Logs dialog showing a split view with log entries on the left (timestamp, status, event, HTTP status) and log details on the right with Request Payload, Response, and Details tabs
delivery-logs-dialog.png
1. Click "View Logs" on a webhook that has been active
2. Select a log entry from the left panel
3. Show the Request Payload tab on the right
4. Capture the full split-view dialog
Save to: static/img/screenshots/developer-tools/webhooks/delivery-logs-dialog.png

Log list (left panel)

Each log entry shows:

ElementDescription
TimestampWhen the delivery was attempted
Status badgeSuccess (green), Failed (red), Pending (yellow), Retrying (blue)
Event typeWhich event triggered the delivery
HTTP statusResponse code from your server (e.g., 200, 500)
Error previewFirst 50 characters of the error message (if failed)

Click a log entry to see its details on the right panel.

Log details (right panel)

Three tabs show the full details:

TabContent
Request PayloadThe complete JSON payload that was sent to your endpoint (with copy button)
ResponseYour server's response body
DetailsDelivery ID, status, HTTP status, retry count, timestamps, and full error message

Logs load 50 at a time — click Load More to see older entries.


Security & signature verification

Every webhook request includes a signature in the X-Webhook-Signature header. This lets you verify that the request genuinely came from EzPulze and wasn't tampered with.

HTTP headers

Each webhook request includes these headers:

HeaderDescription
X-Webhook-SignatureHMAC-SHA256 signature of the request body
X-Webhook-EventEvent type (e.g., message.received)
X-Webhook-IdUnique delivery ID
Content-Typeapplication/json

How to verify the signature

  1. Extract the X-Webhook-Signature header from the request
  2. Compute the HMAC-SHA256 hash of the raw request body using your secret key
  3. Compare the computed hash with the header value
  4. If they match, the request is authentic

Example: Node.js

const crypto = require('crypto');

function verifyWebhookSignature(body, signature, secret) {
const computed = crypto
.createHmac('sha256', secret)
.update(body)
.digest('hex');
return computed === signature;
}

// In your Express route handler:
app.post('/webhooks/ezchat', (req, res) => {
const signature = req.headers['x-webhook-signature'];
const isValid = verifyWebhookSignature(
JSON.stringify(req.body),
signature,
'your-secret-key'
);

if (!isValid) {
return res.status(401).send('Invalid signature');
}

// Process the webhook...
res.status(200).send('OK');
});

Example: Python

import hmac
import hashlib

def verify_signature(body, signature, secret):
computed = hmac.new(
secret.encode(),
body.encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(computed, signature)

Example: PHP

function verifySignature($body, $signature, $secret) {
$computed = hash_hmac('sha256', $body, $secret);
return hash_equals($computed, $signature);
}

Webhook documentation page

EzPulze includes a built-in Webhook Documentation page with comprehensive integration guides.

📸
Screenshot: Webhook Documentation page showing navigation sidebar with sections for Introduction, Events, Payload Format, Security, and n8n Integration
webhook-docs-page.png
1. Navigate to the Webhook Documentation page
2. Capture the page showing the navigation sidebar and content area with code examples
Save to: static/img/screenshots/developer-tools/webhooks/webhook-docs-page.png

Sections

SectionContent
IntroductionWhat webhooks are, how they work
Available EventsAll 5 event types with descriptions
Payload FormatJSON structure with field descriptions
HTTP HeadersSignature, event, and ID headers
SecuritySignature verification with code examples in Node.js, Python, and PHP
Best PracticesTips for reliable webhook handling
n8n IntegrationStep-by-step guide to connect EzPulze with n8n (if available)

n8n integration

If you use n8n for workflow automation, the documentation page includes a dedicated guide for connecting EzPulze webhooks to n8n workflows.

Setup steps

  1. Create a Webhook node in n8n
  2. Copy the n8n webhook URL
  3. Create a webhook subscription in EzPulze with that URL
  4. Select the events you want to receive
  5. Use the n8n workflow to process incoming events

Example use cases with n8n

  • Auto-respond to new messages — Trigger an n8n workflow when a customer messages, then send an auto-reply
  • CRM sync — When a message is received, create or update a contact in your CRM
  • Notifications — Send a Slack or email notification when a message fails to deliver
  • Analytics — Log message events to Google Sheets or a database

Retry behavior

When a webhook delivery fails (your server returns an error or times out):

  • The system logs the failure with the error details
  • The retry count setting determines how many additional attempts are made (0–5)
  • Failed deliveries are logged with the error message and HTTP status code
tip

Set your server to return a 200 status code quickly. Process the webhook payload asynchronously if it requires heavy computation. This prevents timeouts.


Tips

  • Always verify signatures — This prevents unauthorized systems from sending fake webhooks to your endpoint
  • Respond quickly — Return a 200 status within the timeout period, then process the data asynchronously
  • Monitor delivery logs — Check logs regularly to catch any delivery failures early
  • Use HTTPS — Webhook URLs must use HTTPS to ensure data is encrypted in transit
  • Start with the Test button — Before relying on a webhook in production, test it to make sure your endpoint works
  • Subscribe to only the events you need — This reduces unnecessary traffic to your server