Skip to content
OmniChannels.ai

APIs and developers

What is Webhook?

HTTP callback · Status callback · Event notification

Definition

A webhook is an HTTP request that a platform sends to a URL you provide whenever an event happens, such as a message being delivered, read or failed, or a customer reply arriving, so your system learns about it immediately without polling.

You register an endpoint (for example https://example.com/hooks/messaging). When an event occurs, the platform sends a POST request with a JSON body describing it: message ID, status, timestamp, channel and error details. Your server should respond quickly with a 2xx code and process the event asynchronously.

Build for real-world delivery: webhooks can arrive late, out of order or more than once. Use the message ID and status to deduplicate, never move a status backwards (for example from READ to DELIVERED), and keep a retry-safe, idempotent handler.

Security: accept only HTTPS, verify a signature or shared secret on every request, and do not trust the payload until it is verified. Industry conventions such as the Standard Webhooks specification describe common signing and retry patterns.

In messaging, webhooks feed delivery reports, read rates, inbound replies, opt-outs and channel fallback decisions.

Typical failure modes: the endpoint is slow and the platform times out, a deployment makes it return 500 for a few minutes, or a firewall rule blocks the sender. Platforms retry for a limited time, so keep a way to re-request or reconcile missed events, such as a status endpoint you can poll once a day for messages still pending.

Process in two steps: acknowledge fast, then work. Verify the signature, store the raw event, return 200, and let a worker queue handle updates and downstream actions like moving a customer to a fallback channel. This prevents slow business logic from causing retries and duplicates.

Measure the health of your webhook by the share of events acknowledged within a few seconds, the retry count and the gap between the status time in the payload and the time you received it.

Choose events deliberately. Subscribing to every event is noisy; most teams start with delivery statuses and inbound messages, then add template status and account alerts. A single normalised payload across channels, as OmniChannels.ai provides, simplifies the handler.

OmniChannels.ai sends webhooks for delivery statuses (SUBMITTED, SENT, DELIVERED, READ, FAILED, REJECTED), normalised into one format across channels.

Example

{"messageId":"msg_123","channel":"whatsapp","status":"DELIVERED","timestamp":"2026-10-10T09:15:02Z"}

Frequently asked questions

What is the difference between a webhook and an API call?

With an API call you ask the platform for data. With a webhook the platform sends data to you when something happens. Messaging uses both: API for sending, webhooks for statuses and replies.

How do I secure a webhook endpoint?

Use HTTPS, verify the signature or shared secret on every request, check timestamps to block replays, and reject payloads that fail the check.

What if my webhook receives the same event twice?

Deduplicate on the message ID and status. Handlers must be idempotent, because retries and network issues make duplicates normal.

Sources