Repository navigation
feat(events): accept an idempotency key when sending an event - #328
Open
NicolasLopes7 wants to merge 1 commit into
Open
NicolasLopes7 wants to merge 1 commit into
NicolasLopes7 wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 5 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
NicolasLopes7
marked this pull request as ready for review
December 4, 2026 21:10
Author
|
Reply to the cubic review summary ("2 issues found"): neither issue needs a code change.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Events.sendandEvents.send_asynctake an optionaloptionsargument withidempotency_key, sent as theIdempotency-Keyheader onPOST /events/send. This uses the sameSendOptionsshape and request plumbing asEmails.sendandBatch.send. Existing calls don't change.Why
The API accepts
Idempotency-KeyonPOST /events/send. It stops a retried job or a redelivered message from starting duplicate Automation runs. Contract: resend/resend-docs#2039. Node SDK equivalent: resend/resend-node#1205.Usage
How tested
tox -e lint,mypy,pyon Python 3.14: lint OK, mypy clean, 907 passed.examples/events.pyandexamples/async/events_async.pynow show the option.🤖 Generated with Claude Code
Summary by cubic
Events.sendandEvents.send_asyncnow accept an optionaloptionsargument with anidempotency_key, sent as theIdempotency-Keyheader onPOST /events/send. This lets retried jobs or redelivered messages avoid starting duplicate Automation runs. Existing calls are unaffected.SendOptionsshape and request plumbing asEmails.sendandBatch.send.examples/events.pyandexamples/async/events_async.pyto show the new option.Written for commit 9ed3a8b. Summary will update on new commits.