Last week we launched our new bounces UI for Postmark. We significantly cleaned up the delivery issues page trying to both give you a better tool for visualizing bounces and spam complaints and introduce our new features: tags, bounce dumps, inactive bounces. We are proud with the user interface, but having a UI is not always the best thing you can do. What if you had in mind a different way to visualize delivery issues? What if you want to tightly integrate your application with Postmark and fetch and display bounces directly in your dashboard instead of requiring users to use the Postmark UI? Now you can do that!
A New API Is Born #
Postmark has a pretty interesting architecture — its user interface is implemented as a Ruby-on-Rails application, while the delivery API engine is done in ASP.NET. This has enforced on us a clean separation of UI code from delivery code from the very beginning of the project. Since we already had the internal API to let the Ruby app fetch data from the .NET side, it was pretty easy to take that API and expose it through a different endpoint that uses the server API token authentication we already had in place for email delivery and that was basically it. Should I go into details about the extra layer that we built to make sure people had a descriptive error message when they feed us broken data or they get a nice slap on the wrist when they try to access somebody else’s data? Probably not.
Using the API to Work with Bounces #
So, what’s in store with the new API? Here’s the list:
- Getting a list of tags defined for the current server
- Retrieving a summary of the delivery issues: the number of bounces for every bounce type and the number of inactive bounces
- Fetching a filtered list of bounces with paging support
- Reading the details of a single bounce
- Obtaining the raw dump for a bounce (One more and I have to hunt for a Thesaurus to get more verbs for reading/loading data)
- Activating an inactive bounce
You can get the full details for every method, the input it requires, and the returned output in the Bounce API documentation.
Now what? #
We have done our best to make the API as extensive as possible, and we are almost as good at guessing the way people would use Postmark as Chuck Norris himself, but we may have missed something. So, if a cool idea on using Postmark bounces crosses your mind, feel free to share it.
Interested in growing your audience? Write for the Postmark blog