Prompt

How do I set up webhooks for delivered, bounced, and opened emails?

Technology / API Platforms1 observationLast seen Nov 21, 2026

Latest observation

Nov 21, 2026OpenAI APIWeb search: off

To set up webhooks for email events like delivered, bounced, and opened, you generally need to do three things:

  1. Create an HTTPS endpoint on your server to receive webhook POST requests.
  2. Register that endpoint with your email provider’s webhook/event settings.
  3. Verify and handle the incoming events in your app.

1) Create a webhook endpoint

Your app needs a public URL that can accept POST requests, for example:

  • https://yourdomain.com/webhooks/email-events

This endpoint should:

  • Return a 2xx response quickly
  • Parse JSON payloads
  • Verify the sender/signature if your provider supports it
  • Handle retries safely (idempotently)

2) Subscribe to the right events

In your email service dashboard or API, enable events such as:

  • delivered
  • bounced
  • opened

Some providers may also offer:

  • deferred
  • complained
  • clicked
  • unsubscribed

3) Process the event payload

Your webhook handler should inspect the event type and act accordingly.

Example logic:

  • delivered → mark message as delivered
  • bounced → mark address as invalid / delivery failed
  • opened → log engagement/open tracking

Example webhook handler

Here’s a simple Node.js/Express example:

import express from "express";

const app = express();
app.use(express.json());

app.post("/webhooks/email-events", (req, res) => {
  const event = req.body;

  switch (event.event || event.type) {
    case "delivered":
      console.log("Delivered:", event);
      break;
    case "bounced":
      console.log("Bounced:", event);
      break;
    case "opened":
      console.log("Opened:", event);
      break;
    default:
      console.log("Other event:", event);
  }

  res.sendStatus(200);
});

app.listen(3000, () => console.log("Listening on port 3000"));

Important considerations

  • Use HTTPS for your webhook URL.
  • Verify authenticity with HMAC signatures or provider-specific headers.
  • Deduplicate events because providers may retry deliveries.
  • Test with provider tools or by sending test emails.

If you’re using a specific provider

The exact setup depends on your email service, for example:

  • SendGrid
  • Mailgun
  • Postmark
  • Amazon SES
  • Resend
  • SMTP2GO

If you tell me which provider you’re using, I can give you the exact setup steps and a ready-to-use example.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.