Skip to content

webhooks baby#294

Closed
KMKoushik wants to merge 2 commits intomainfrom
km/2025-11-17-webhook
Closed

webhooks baby#294
KMKoushik wants to merge 2 commits intomainfrom
km/2025-11-17-webhook

Conversation

@KMKoushik
Copy link
Copy Markdown
Member

@KMKoushik KMKoushik commented Nov 28, 2025


Summary by cubic

Adds first-class webhooks: dashboard UI for endpoint management, signed delivery with retries, and event emission for email, domain, and contact events. This enables teams to receive real-time updates and review delivery history, and ships SDK helpers to verify signatures and handle typed events.

  • New Features

    • New Webhook and WebhookCall tables with statuses, indexes, and foreign keys.
    • Webhook TRPC API: list, create (plan limits: Free=1, Basic=unlimited), update, setStatus, delete, test, listCalls, getCall, retryCall.
    • BullMQ dispatch worker with HMAC-signed POSTs, exponential backoff, per-webhook locks, response capture, and auto-disable after repeated failures.
    • Daily cleanup job removes webhook call logs older than 30 days.
    • Emits events from SES hook parser (queued, sent, delivered, bounced, opened, clicked, etc.), domain service (created, verified, updated, deleted), and contact service (created, updated, deleted).
    • New shared package @usesend/lib with webhook event types and SES error constants; imports updated accordingly.
    • SDK: webhook signature verification and typed events (constructEvent, verifyWebhookSignature; header constants).
  • Migration

    • Run Prisma migrations.
    • Ensure Redis is configured and the worker processes are running (dispatch queue and cleanup scheduler).

Written for commit 62d2baa. Summary will update on new commits.

Summary by CodeRabbit

  • New Features
    • Full webhooks support: manage webhooks (create/edit/delete/rotate), subscribe to email/domain/contact events, test deliveries, delivery logs, retry failed calls, detailed call inspector with payload/response view, and signing-secret copy/toggle.
    • Background dispatch and daily cleanup job for webhook calls; webhook emission added across email/contact/domain flows.
  • Documentation
    • SDK docs and webhook verification utilities added.
  • Chores
    • Plan-based webhook limits and new shared library and SDK exports; UI and styling adjustments.

✏️ Tip: You can customize this high-level summary in your review settings.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant