Beta Private build — not open for production traffic yet

Webhooks

Add endpoints under Developers → Webhooks. Hedvi sends Resend-compatible payloads (type, created_at, data) for email.sent, email.delivered, email.delivery_delayed, email.bounced, email.complained, email.failed and email.suppressed, plus opt-in Hedvi events (hedvi.email.delivery_unknown, hedvi.quota.warning, hedvi.project.paused, domain.updated). Recipient events contain the affected recipient in to.

Verify signatures

Requests are signed with the Standard Webhooks scheme over id.timestamp.body (headers webhook-id, webhook-timestamp, webhook-signature, mirrored as svix-*). Reject timestamps older than 5 minutes. The Resend SDK verifies them:

import { Resend } from "resend";

const resend = new Resend(process.env.HEDVI_API_KEY);

export async function POST(req: Request) {
  const payload = await req.text(); // the raw body, unparsed
  try {
    const event = resend.webhooks.verify({
      payload,
      headers: {
        id: req.headers.get("webhook-id")!,
        timestamp: req.headers.get("webhook-timestamp")!,
        signature: req.headers.get("webhook-signature")!,
      },
      webhookSecret: process.env.HEDVI_WEBHOOK_SECRET!, // whsec_…
    });
    // Deduplicate on webhook-id: delivery is at least once.
    return new Response(null, { status: 204 });
  } catch {
    return new Response("invalid signature", { status: 400 });
  }
}

Delivery