We recently released some enhancements to the bounce webhook, and also mentioned that we were working on a new webhook for delivery events. I’m happy to say that the new delivery webhook is now available.
Why would you use such a thing? In talking to our customers we discovered a bunch of different scenarios where a delivery webhook would be really useful. The most common use cases we heard about include:
- Feed delivery events into a variety of internal systems to trigger additional actions on your end (such as update user information in your CRM).
- Provide delivery events directly to your customers through a custom UI to cut down on complaints/queries about the delivery of certain emails.
- Aggregate delivery events to calculate when there are delivery slowdowns and set thresholds to take action (such as switch to a backup service).
With the new delivery webhook you’ll be able to do all of this, and I’m sure a bunch of other neat stuff we haven’t even thought about.
What do we mean by “Delivery”, I hear you ask? In Postmark, an email is considered successfully delivered when the destination email server returns an OK response after delivery is attempted. When that happens, Postmark adds a delivery confirmation for that particular email and recipient to the Activity feed in your Postmark account. At the same time, if the delivery webhook is enabled, a hook will now be posted to your delivery webhook URL.
One thing to note is that at this point the email is out of Postmark's hands, and the receiving server still has to send the email to the user's inbox. This usually happens instantly, but in rare cases, such as when an internal server firewall is set up, emails can get queued by the receiving server.
You can see the complete webhook documentation here, but here are the most important fields that will be POSTed to your webhook URL:
Recipient— the email address of the recipient.
Tag— delivery tag that was used when the message was sent.
DeliveredAt— timestamp of when email was delivered.
Details— response line received from the destination email server.
To help you get started with the delivery webhook we put together a help article to walk you through the setup process. As always, we hope that you find this feature useful, and we’d love to hear your feedback. You can send me an email directly, or set up a call to chat with me in person.
Interested in growing your audience? Write for the Postmark blog