Skip to main content

Webhooks

Zeplo Webhooks deliver real-time event notifications to your server whenever something happens in your WhatsApp environment. Get instant updates when messages are received, delivered, or read; when conversations open or close; and when contacts are created or updated. Every payload is cryptographically signed so you can verify authenticity, and failed deliveries are retried automatically with exponential backoff.

Event Types

Subscribe to the exact events you care about — message lifecycle, conversation state changes, and contact updates.

Payload Verification

Every webhook payload includes a cryptographic signature. Verify it on your server to confirm the request originated from Zeplo.

Retry Logic

Failed deliveries are retried up to 5 times with exponential backoff over 24 hours. Inspect delivery logs to diagnose persistent failures.

Webhook Testing

Use the built-in test sender in the Zeplo Dashboard to send sample payloads to your endpoint during development.

Basic Usage

The webhook secret is used to generate HMAC-SHA256 signatures. Store it securely and never expose it in client-side code. Rotate the secret periodically via the Dashboard or API.

Event Types

Best Practices

All webhook endpoints must use HTTPS with a valid SSL certificate. Zeplo will not deliver events to HTTP URLs or endpoints with self-signed certificates. Use a reverse proxy like Nginx or a tunneling tool like ngrok during local development.
Always verify the X-Zeplo-Signature header before processing a webhook payload. This confirms the request came from Zeplo and not a third party. Use constant-time comparison (crypto.timingSafeEqual or hmac.compare_digest) to prevent timing attacks.
Design your webhook handler to be idempotent. Zeplo may deliver the same event more than once during retries. Use the eventId field in the payload header to deduplicate events before processing.
Your endpoint must respond with a 200-level status code within 10 seconds. If your processing takes longer, acknowledge immediately and handle the work asynchronously (e.g., enqueue to a job queue). Slow responses trigger retries and can eventually disable the webhook.

API Reference: List Webhooks

Explore the full request schema, event subscription options, and response format for the webhooks endpoint.