Webhook docs

Signed email webhooks for delivery, engagement, and bounce state

Bavimail webhooks let your product react to message delivery, open, click, bounce, complaint, and suppression updates as they happen.

Typical path

01Verify a domain
02Send your first event-driven email
03Subscribe to delivery and engagement webhooks
04Monitor reputation, suppressions, and analytics
Verification

Verify every payload before you trust the event

webhook-handler.ts
import { verifyWebhook } from 'bavimail'

app.post('/webhooks/email', async (req, res) => {
  const event = verifyWebhook({
    body: req.body,
    headers: req.headers,
    secret: process.env.BAVIMAIL_WEBHOOK_SECRET,
  })

  switch (event.type) {
    case 'email.delivered':
    case 'email.opened':
    case 'email.clicked':
    case 'email.bounced':
      await reconcileEmailState(event)
      break
  }

  res.status(200).end()
})

What arrives

Signed payloads arrive with event type, message identifiers, recipient context, timestamps, and event-specific fields.

What to store

Persist the message id, event type, event timestamp, and your own reconciliation result to support retries and audits.

What to avoid

Do not trust unsigned payloads, do not make handlers non-idempotent, and do not block the response on slow downstream work.

Event model

The events most teams wire first

email.delivered

Use this event to update message status, trigger follow-up automation, or record customer communication health.

email.opened

Use this event to update message status, trigger follow-up automation, or record customer communication health.

email.clicked

Use this event to update message status, trigger follow-up automation, or record customer communication health.

email.bounced

Use this event to update message status, trigger follow-up automation, or record customer communication health.

More

Move from webhooks into the broader platform

Explore next

Transactional Email API

Send app email with batch sends, scheduling, analytics, and clean domain controls.

Learn more

Inbound Email Processing

Receive email, parse content, capture attachments, and route inbound traffic to your app.

Learn more

Email Webhooks

Verify signed webhook events for delivered, opened, clicked, bounced, and complaint workflows.

Learn more

Domain Verification

Guide teams through SPF, DKIM, DMARC, MAIL FROM, and production-ready domain authentication.

Learn more
Docs paths

Docs Overview

Start with the platform model, launch sequence, and production checklist.

Learn more

API Reference

See the core resources for send, inbound, domains, analytics, and suppressions.

Learn more

Webhook Docs

Learn the event model, signature verification flow, and retry patterns.

Learn more

SDK Guides

Install the official TypeScript, Python, and .NET clients with working examples.

Learn more
Buyer research

Bavimail vs Resend

Compare pricing posture, inbound depth, domain tooling, and production workflows.

Learn more

Bavimail vs SendGrid

See where Bavimail is simpler for modern developer teams and smaller production stacks.

Learn more

Need pricing context?

See the plan structure, retention windows, and overage model before you ship.

View pricing

Need implementation help?

Use the docs hub for quickstarts, API concepts, SDKs, and webhook guides.

Read docs

Need migration proof?

Compare Bavimail against incumbent options before you change providers.

Compare providers