Skip to content

feat(webhooks): add event replay endpoint - #236

Merged
gabrielmfern merged 2 commits into
mainfrom
feat/webhook-event-replay
Sep 3, 2026
Merged

feat(webhooks): add event replay endpoint#236
gabrielmfern merged 2 commits into
mainfrom
feat/webhook-event-replay

Conversation

@gabrielmfern

@gabrielmfern gabrielmfern commented Sep 3, 2026

Copy link
Copy Markdown
Member

Adds Resend::Webhooks.replay_event(webhook_id, event_id), which calls POST /webhooks/{webhook_id}/events/{event_id}/replay and returns { object: "webhook_event", id: "msg_..." }. Queues one more delivery of the event to the webhook; manual replays do not schedule automatic retries.

replayed = Resend::Webhooks.replay_event(
  "4dd369bc-aa82-4ff3-97de-514ae3000ee0",
  "msg_1srOrx2ZWZBpBUvZwXKQmoEYga2"
)
puts replayed[:id]

Also adds the call to examples/webhooks.rb and sets Metrics/ModuleLength: 169 in .rubocop.yml. The Webhooks module is a flat list of one-method-per-endpoint wrappers, so its length tracks the API surface; the default 100 was crossed by this method and would be crossed again by the next one.

Spec PR: resend/resend-openapi#112
API PR: https://github.com/resend/resend-monorepo/pull/9535

Checks (Ruby 4.0.6, bundle install): bundle exec rubocop no offenses, bundle exec rake spec 400 examples, 0 failures. No live API call was made; version bump left for the chore PR.

Part of DEV-2005.

Linear: https://linear.app/resend/issue/DEV-2011

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Requires human review: Adds a new public webhook replay API that triggers an additional event delivery. Human approval is needed for the external contract and operational semantics of manual replays.

Re-trigger cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 1 file (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread spec/webhooks_spec.rb
@gabrielmfern
gabrielmfern marked this pull request as ready for review September 3, 2026 19:19
@gabrielmfern
gabrielmfern merged commit 57c8f2e into main Sep 3, 2026
8 checks passed
@gabrielmfern
gabrielmfern deleted the feat/webhook-event-replay branch September 3, 2026 20:42
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.

2 participants