Signed webhooks for every email event
FrontEngine tells your system when a message is delivered, delayed, failed, bounced, opened or has a link clicked. Every notification is signed, and your system checks the signature with a public key.
The ten event types
| Event | When it is sent |
|---|---|
MessageSent | The recipient's server accepted the message |
MessageDelayed | Delivery failed temporarily and will be retried |
MessageDeliveryFailed | Delivery failed permanently |
MessageHeld | The message was held and did not go out for delivery, for example because the recipient is on a suppression list |
MessageBounced | A bounce message arrived after the destination had accepted the message |
MessageLoaded | The recipient opened the message (requires tracking) |
MessageLinkClicked | The recipient clicked a tracked link |
SendLimitApproaching | The server is close to its send limit |
SendLimitExceeded | The server went over its send limit |
DomainDNSError | The daily check found a problem in a domain's DNS records |
There is no spam complaint event.
RSA-SHA256 signature with a public key
Every webhook request carries an RSA-SHA256 signature of the body in the X-Postal-Signature-256 header. The X-Postal-Signature-KID header says which key signed it.
The public keys are published as a JWKS document at https://api.frontengine.net/.well-known/jwks.json. Your system fetches the key named in the request, checks the signature against the body exactly as received, and only then processes the event.
This model has two practical consequences:
- There is no shared secret. Your system stores only a public key, which cannot be used to forge events even if it leaks.
- Common JWKS libraries work. Any language with JWK and RSA support can verify the signature.
To stay compatible with integrations written for Postal, the request also carries an RSA-SHA1 signature in X-Postal-Signature. In new integrations, verify the SHA-256 one.
How to verify a webhook
Keep the raw body
Read the bytes of the request body before parsing the JSON. The signature is computed over those bytes.
Fetch the public key
Get the JWKS at
https://api.frontengine.net/.well-known/jwks.jsonand pick the key whose identifier matches theX-Postal-Signature-KIDheader. Cache the JWKS.Check the signature
Verify the value of
X-Postal-Signature-256with RSA-SHA256. If verification fails, discard the request.Respond, then process
Acknowledge receipt with a success response and process the event from a queue of your own. Handle repeated events without duplicating their effects.
Delivery and retries
- Attempts
- Up to 6 per event, at increasing intervals
- When a retry happens
- When your endpoint does not acknowledge receipt
- Accepted destinations
- Public HTTP endpoints. Private network addresses are refused
- Signature
- RSA-SHA256 (
X-Postal-Signature-256) and RSA-SHA1 (X-Postal-Signature) - Public keys
https://api.frontengine.net/.well-known/jwks.json
Frequently asked questions
What happens if my endpoint is down?
FrontEngine tries again, up to 6 times per event, at increasing intervals. After the last attempt the event is not sent again.
Can I receive the same event more than once?
Yes. If your endpoint processes the event but the acknowledgment does not reach us, there will be another attempt. Write your handler so that a repeated event has no duplicate effect.
Do open and click events work without any setup?
No. MessageLoaded and MessageLinkClicked depend on tracking on a domain of your own.
Do I need to allow IP addresses in my firewall?
The authenticity of a webhook is established by the signature, not by the source address. Verify the signature on every request.
Receive the events in your system
The documentation has the format of each event and signature verification examples.