Company
Date Published
Author
Patrick Graham
Word count
2041
Language
English
Hacker News points
None

Summary

Postmark provides webhooks for bounces, inbound messages, and open tracking events in the form of HTTP POSTs in well-formatted JSON to the specified URL. Webhooks allow users to receive notifications and data as triggering events occur without having to make API calls. The JSON format for bounce and spam complaint notifications includes fields such as ID, Type, Name, Tag, MessageID, Description, Email, BouncedAt, DumpAvailable, Inactive, CanActivate, Subject, and more. For inbound messages, the received JSON contains information about the sender's email address, recipient's name and email address, message content, attachments, and other details. The open tracking webhook pushes notifications with data such as client type, OS environment, and user agent information when an email is opened. Delivery webhooks provide real-time notifications for successful delivery of emails sent through Postmark. To test webhooks, users can use RequestBin or cURL to receive and process the data received at their URL(s). Security measures include validating incoming requests against JSON schema and only allowing HTTP POST method usage. An example application demonstrating how to receive, process, and display Postmark's webhooks is available on GitHub.