digitaltrendz.dev

Webhooks

All inbound webhook endpoints. Use digitaltrendz.dev as the base URL when registering with third-party services.

Important Notes

  • ·All webhook endpoints are excluded from middleware auth processing.
  • ·Webhook paths match: /api/webhooks/* — always bypass JWT/session checks.
  • ·Use digitaltrendz.dev as the base URL for all third-party webhook registrations.
  • ·Always verify signatures — never trust payload content without signature validation.
  • ·Respond with 200 quickly; do heavy processing asynchronously to avoid timeouts.

Resend Email Events

Provider: Resend

Provider docs →

Endpoint URL

POSThttps://digitaltrendz.dev/api/webhooks/resend

Auth: Resend-Signature header (HMAC-SHA256)

Events

email.sent

Email accepted and queued for delivery.

email.delivered

Email successfully delivered to recipient.

email.delivery_delayed

Delivery delayed — retrying.

email.bounced

Email bounced. Hard or soft bounce recorded.

email.complained

Recipient marked email as spam.

email.opened

Recipient opened the email.

email.clicked

Recipient clicked a tracked link.

Payload Example

// Resend webhook payload example
{
  "type": "email.delivered",
  "created_at": "2026-06-15T12:00:00.000Z",
  "data": {
    "email_id": "re_abc123",
    "from": "info@digital-trendz.net",
    "to": ["client@example.com"],
    "subject": "Your report is ready",
    "created_at": "2026-06-15T12:00:00.000Z"
  }
}

Setup Steps

  1. 1

    Go to Resend Dashboard → Webhooks → Add Endpoint

  2. 2

    Enter URL: https://digitaltrendz.dev/api/webhooks/resend

  3. 3

    Select events to listen for

  4. 4

    Copy the Signing Secret and add to Vercel env as RESEND_WEBHOOK_SECRET

Adding a new webhook integration?

Create app/api/webhooks/[service]/route.ts, exclude the path in the middleware matcher, and document it here.