Infrastructure

What is Webhook?

A webhook is an HTTP callback that sends real-time notifications to your application when specific events occur, such as email delivery, opens, clicks, or bounces.

A webhook is an automated message sent from one application to another when a specific event occurs. Unlike APIs where you request information, webhooks push information to you in real-time. They're essentially user-defined HTTP callbacks.

In email, webhooks notify your application about delivery events: when an email is delivered, opened, clicked, bounces, or receives a spam complaint. Instead of polling an API to check status, you receive instant notifications the moment something happens.

A typical webhook setup involves: creating an endpoint in your application to receive webhook data, registering that URL with your email provider, and handling the incoming POST requests with event data. The payload usually includes the event type, email ID, recipient, timestamp, and relevant details.

Why Webhook Matters

Webhooks enable real-time visibility into your email operations. Instead of wondering if an email was delivered, you know instantly. This powers features like delivery confirmations in your UI, automated bounce handling, engagement tracking, and alerting on delivery issues. They're essential for building responsive, data-driven email systems.

How Ark Handles Webhook

Ark supports webhooks for all email events: delivered, bounced, opened, clicked, and spam complaints. Configure multiple webhook endpoints for different event types, receive signed payloads for security, and use our delivery history to debug and replay failed webhook calls.

Frequently Asked Questions

How do I set up webhooks?

Create an HTTP endpoint in your application that accepts POST requests, register the URL with your email provider, and implement handlers for each event type you want to track. Most providers include example payloads and testing tools.

How do I verify webhook authenticity?

Reputable providers sign webhook payloads with a secret key. Verify the signature before processing to ensure the webhook came from your email provider and wasn't forged by an attacker.

What if my webhook endpoint is down?

Good webhook systems retry failed deliveries with exponential backoff. Ark retries failed webhooks multiple times over several hours. You can also use our API to fetch events if webhooks fail.

How fast do webhooks arrive?

Webhooks should arrive within seconds of the event occurring. Delivery webhooks typically arrive within 1-2 seconds of successful delivery. Open and click webhooks arrive in real-time as they happen.

Related Terms

Ready to improve your email deliverability?

Ark handles webhook and more automatically. Start sending in 5 minutes.