Postmark bounce notifications on your phone.

Get a push notification when an email you sent through Postmark hard-bounces or is blocked, with the address and whether Postmark deactivated it.

How it works

Three steps to your first push

STEP 01

Install the recipe

One click in Studio gives you a personal webhook URL.

STEP 02

Paste your URL into Postmark

Add it as a webhook for Bounce.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Postmark bounce webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. In Postmark, open your Server, pick the Message Stream (for example Default Transactional Stream) and go to its Webhooks tab.
  3. Click Add webhook and paste your webhook URL as the Webhook URL.https://••••••••/•••••••• your personal URL, shown after install
  4. Tick Bounce and save. Postmark checks that the endpoint answers before it starts sending.
  5. Webhooks in Postmark belong to one **Message Stream** of one **Server**, so add this webhook to each stream you want to watch (for example your transactional and your broadcast stream).
  6. These bounce types always push:
  7. **Hard bounce**, **Invalid email address** and **Spam notification**: Normal priority.
  8. **ISP block**, **DMARC policy**, **Template rendering failed** and **SMTP API error**: High priority, because they usually affect more than one recipient.
  9. Other types (soft bounces, transient delays, DNS errors, auto-responders, …) only push when Postmark deactivated the address because of them. Add `?all=1` to the webhook URL to get every bounce:
  10. ```
  11. your webhook URL?all=1
  12. ```
  13. Postmark doesn't sign webhooks. It supports HTTP basic auth in the URL and custom headers, but JustPush doesn't check either yet, so keep your endpoint URL private. When you save the webhook, Postmark checks that the endpoint answers for each event type; that check may produce one test push.
The code

What runs when the webhook arrives

Studio calls handleRequest(request) with the incoming webhook and sends the message it returns. It's yours after install; change anything.

transform.js
1// Postmark → Bounce webhook
2// Fires when Postmark processes a bounce for an email you sent. Hard bounces, blocks and
3// other failures push by default; soft bounces, auto-replies and the like only push when
4// Postmark deactivated the address, or with ?all=1.
5// Docs: https://postmarkapp.com/developer/webhooks/bounce-webhook
6
7// Bounce types (the "Type" field) that always push, and how loud to be.
8const LOUD = {
9 HardBounce: 0, // the address is dead; worth knowing, not urgent
10 BadEmailAddress: 0,
11 SpamNotification: 0,
12 Blocked: 1, // High: an inbox provider is blocking you, which hits many recipients
13 DMARCPolicy: 1, // High: your domain's authentication is failing
14 TemplateRenderingFailed: 1, // High: your template is broken
15 SMTPApiError: 1,
16}
17
18// Look a key up without tripping over inherited names like "toString".
19function pick(table, key, fallback) {
20 return Object.prototype.hasOwnProperty.call(table, key) ? table[key] : fallback
21}
22
23// A trimmed string, or null.
24function text(value) {
25 return typeof value === "string" && value.trim() ? value.trim() : null
26}
27
28function handleRequest(request) {
29 const body = request.body && typeof request.body === "object" ? request.body : {}
30
31 // Guard: only bounces. Spam complaints and subscription changes have their own RecordType.
32 if (body.RecordType !== "Bounce") {
33 console.log(`Ignoring Postmark "${body.RecordType ?? "unknown"}" webhook`)
34 return null
35 }
36
37 // ?all=1 on the webhook URL also pushes soft bounces, auto-replies and other noise.
38 const all = ["1", "true", "yes"].includes(String(request.query?.all ?? "").toLowerCase())
39 const loud = pick(LOUD, body.Type, null)
40 const inactive = body.Inactive === true
41
42 if (loud === null && !inactive && !all) {
43 console.log(`Skipping Postmark bounce type "${body.Type ?? "unknown"}"`)
44 return null
45 }
46
47 // "Hard bounce" from Postmark's Name, else the Type split into words ("SoftBounce" → "Soft Bounce").
48 const name = text(body.Name) ?? text(body.Type)?.replace(/([a-z])([A-Z])/g, "$1 $2") ?? "Bounce"
49 const subject = text(body.Subject)
50
51 return {
52 title: `↩️ ${name}`,
53 message: [
54 text(body.Email) ?? "A recipient",
55 subject ? `"${subject}"` : null,
56 inactive ? "address deactivated" : null,
57 ]
58 .filter(Boolean)
59 .join(" · "),
60 topic: "Postmark",
61 // Loud types use their own priority. Others: Normal when the address was deactivated, else Low.
62 priority: loud ?? (inactive ? 0 : -1),
63 }
64}
Payload

The Postmark Bounce webhook

This is what Postmark sends to your URL for bounce. It is a sample, trimmed to the fields recipes use.

Bounce · sample.json
1{
2 "ID": 692560173,
3 "Tag": "welcome-email",
4 "From": "[email protected]",
5 "Name": "Hard bounce",
6 "Type": "HardBounce",
7 "Email": "[email protected]",
8 "Details": "smtp;550 5.1.1 The email account that you tried to reach does not exist.",
9 "Subject": "Welcome to Acme",
10 "Inactive": true,
11 "Metadata": {
12 "customer_id": "cus_1234"
13 },
14 "ServerID": 23,
15 "TypeCode": 1,
16 "BouncedAt": "2026-09-29T08:33:54.9070259Z",
17 "MessageID": "883953f4-6105-42a2-a16a-77a8eac79483",
18 "RecordType": "Bounce",
19 "CanActivate": true,
20 "Description": "The server was unable to deliver your message (ex: unknown user, mailbox not found).",
21 "DumpAvailable": true,
22 "MessageStream": "outbound"
23}
FAQ

Postmark bounce notifications: questions

Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into Postmark and you are done. The code is there if you want to change the text, the sound or the buttons.

Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.

Ready when you are

Postmark on your phone in two minutes.

Install the recipe, paste one URL, done. Free for 30 days, no credit card required.