Plunk's API does not appear to offer any such feature: https://docs.useplunk.com/api-reference/transactional/send
Unfortunately neither does Resend, Sendgrid, Postmark, etc.
Plunk's API does not appear to offer any such feature: https://docs.useplunk.com/api-reference/transactional/send
Unfortunately neither does Resend, Sendgrid, Postmark, etc.
I don't even expect them to keep a list of IDs forever, just some best effort like "we don't send anything with the same id twice in a one-hour window"
Gmail's API did support this I believe, and then ofc my org transitioned to Microsoft so my little homemade email service quit working
The solution I ended up with was to build my own pseudo-idempotency around Postmark. It helps that Postmark at least has proper persistence so you can query their API to check if you've already sent a certain email. I had to move away from Mailchimp because, if an email gets queued for some reason, it isn't reflected as sent in the API so there's no way of knowing whether an email is hiding in "queued limbo". Postmark doesn't have this problem.
The only caveat is that there is a delay between sending an email and it being reflected in the API (seems pretty standard across the different services). This means I had to implement a simple database backed lock to make sure I never try to send the same email more than once in quick succession.
It's kind of ridiculous, but.. I couldn't find any alternative.
Edit:
Wonder if it would be worth wrapping something like this up into some kind of a self-hostable proxy service. You'd provide the idempotency key in a header and it would do the rest