Postmark - Sender signature confirmation email bounced

165 views Asked by At

We have a service that helps our customers to onboard and manage their customers. When they create an account with us, we create a sender signature in postmark and through postmark send a confirmation email notification. But some of these emails are bouncing due to various reasons. Is there a way to fetch the details on if the conform sender signature email bounced through API?

I see that they have a bounce API, but by using the Get bounces API and adding an email address as the filter, should give the list of bounces. Does it make sense to use this API for this purpose?

https://postmarkapp.com/developer/api/bounce-api#bounces

2

There are 2 answers

1
user3772854 On

The Get bounces API call using the email address as a filter should work for the purpose that you described. However bounces don't always happen right when the message is delivered, and if a message were to bounce for any reason after you make this API call, you would have no way to know. For this reason I recommend the Bounce Webhook, which will capture all bounces in real-time as they occur.

0
Vadim Kononov On

You may be looking for Postmark's Suppression dump API.

/message-streams/{stream_id}/suppressions/dump

When an email bounces, it is automatically added to Postmark's suppression list, and you can download this suppression list and get the email signature for all emails that bounced (see 2nd item in the JSON below).

Here's an example response from Postmark:

{  
  "Suppressions":[
    {  
      "EmailAddress":"[email protected]",
      "SuppressionReason":"ManualSuppression",
      "Origin": "Recipient",
      "CreatedAt":"2019-12-17T08:58:33-05:00"
    },
    {  
      "EmailAddress":"[email protected]",
      "SuppressionReason":"HardBounce",
      "Origin": "Recipient",
      "CreatedAt":"2019-12-17T08:58:33-05:00"
    },
    {  
      "EmailAddress":"[email protected]",
      "SuppressionReason":"SpamComplaint",
      "Origin": "Recipient",
      "CreatedAt":"2019-12-17T08:58:33-05:00"
    }
  ]
}