Overview

Integration

User guide

API reference

Webhooks

Suppressions API

This endpoint allows you to manage view, create, and delete suppressions in your Message Stream. If an address is suppressed it means it's not currently active for sending to. Deleting a HardBounce suppression is the equivalent of reactivating the associated Bounce.

Suppression dump #

get

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

Request headers

Accept required

application/json

X-Postmark-Server-Token required

This request requires server level privileges. This token can be found on the API Tokens tab under your Postmark server.

Example request with curl

curl "https://api.postmarkapp.com/message-streams/{stream_id}/suppressions/dump?origin=recipient&fromdate=2019-12-01" \
  -X GET \
  -H "Accept: application/json" \
  -H "X-Postmark-Server-Token: server token"

Querystring parameters

SuppressionReason

Filter by suppression reason. Possible options: HardBounce, SpamComplaint, ManualSuppression.

Origin

Filter by origin of how the address was added to suppression list. Possible options: Recipient, Customer, Admin.

todate

Filter suppressions up to the date specified (inclusive). e.g. 2020-02-01.

fromdate

Filter suppressions up to the date specified (inclusive). e.g. 2020-02-01.

EmailAddress

Filter by email address.

Response

Suppressions array​

List of objects that each represent a single suppression.

Example response

HTTP/1.1 200 OK
Content-Type: application/json

{  
  "Suppressions":[
    {  
      "EmailAddress":"address@wildbit.com",
      "SuppressionReason":"ManualSuppression",
      "Origin": "Recipient",
      "CreatedAt":"2019-12-17T08:58:33-05:00"
    },
    {  
      "EmailAddress":"bounce.address@wildbit.com",
      "SuppressionReason":"HardBounce",
      "Origin": "Recipient",
      "CreatedAt":"2019-12-17T08:58:33-05:00"
    },
    {  
      "EmailAddress":"spam.complaint.address@wildbit.com",
      "SuppressionReason":"SpamComplaint",
      "Origin": "Recipient",
      "CreatedAt":"2019-12-17T08:58:33-05:00"
    }
  ]
}

Create a Suppression #

post

/message-streams/{stream_id}/suppressions

Request headers

Accept required

application/json

X-Postmark-Server-Token required

This request requires server level privileges. This token can be found on the API Tokens tab under your Postmark server.

Example request with curl

curl "https://api.postmarkapp.com/message-streams/{stream_id}/suppressions" \
  -X POST \
  -H "Accept: application/json" \
  -H "X-Postmark-Server-Token: server token"\
  -d '{
  "Suppressions": [{
      "EmailAddress": "good.address@wildbit.com"
    },
    {
      "EmailAddress": "spammy.address@wildbit.com"
    },
    {
      "EmailAddress": "invalid-email-address"
    }
  ]
}'

Body format

Suppressions array​ required

An ​array that will contain that email addresses to create a suppression on. Max of 50 suppressions that can be created in one call.

EmailAddress string

The email address to request suppression creation on.

Example body format

{  
  "Suppressions":[
    {  
      "EmailAddress":"good.address@wildbit.com"
    },
    {  
      "EmailAddress":"spammy.address@wildbit.com"
    },
    {  
      "EmailAddress":"invalid-email-address"
    }
  ]  
}

Response

Suppressions array​

List that represent suppressions that were called for creation.

EmailAddress string

An email address that the suppression creation was requested on.

Status string

Status of suppression creation request. Possible values: Failed, Suppressed.

Message string

If address cannot be suppressed (Status: Failed), the cause for failure is listed. If suppression is created, (Status: Suppressed) message is null.

Example response

HTTP/1.1 200 OK
Content-Type: application/json

{  
  "Suppressions":[
    {  
      "EmailAddress":"good.address@wildbit.com",
      "Status":"Suppressed",
      "Message": null
    },
    {  
      "EmailAddress":"spammy.address@wildbit.com",
      "Status":"Failed",
      "Message": "You do not have the required authority to change this suppression."
    },
    {  
      "EmailAddress":"invalid-email-address",
      "Status":"Failed",
      "Message": "An invalid email address was provided."
    }
  ]  
}

Delete a Suppression #

post

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

Request headers

Accept required

application/json

X-Postmark-Server-Token required

This request requires server level privileges. This token can be found on the API Tokens tab under your Postmark server.

Example request with curl

curl "https://api.postmarkapp.com/message-streams/{stream_id}/suppressions/delete" \
  -X POST \
  -H "Accept: application/json" \
  -H "X-Postmark-Server-Token: server token" \
  -d '{
  "Suppressions": [
    {
      "EmailAddress": "bounced.address@wildbit.com"
    },
    {
      "EmailAddress": "not.suppressed@wildbit.com"
    },
    {
      "EmailAddress": "spammy.address@wildbit.com"
    }
  ]
}'

Body format

Suppressions array​ required

An ​array of email addresses to delete a suppression on. Max of 50 suppressions that can be removed in one call.

EmailAddress string

The email address to request suppression deletion on.

Example body format

{  
  "Suppressions":[  
    {  
      "EmailAddress":"good.address@wildbit.com"
    },
    {  
      "EmailAddress":"not.suppressed@wildbit.com"
    },
    {  
      "EmailAddress":"spammy.address@wildbit.com"
    }
  ]
}

Response

Suppressions array​

List that each represent suppressions that were called for deletion.

EmailAddress string

An email address that the suppression deletion was requested on.

Status string

Status of suppression deletion request. Possible values: Failed, Deleted.

Message string

If address cannot be deleted (Status: Failed), the cause for failure is listed. If suppression deletion Status is successful (Status: Deleted) message is null.

Example response

HTTP/1.1 200 OK
Content-Type: application/json

{  
  "Suppressions":[
    {  
      "EmailAddress":"good.address@wildbit.com",
      "Status":"Deleted",
      "Message": null
    },
    {  
      "EmailAddress":"not.suppressed@wildbit.com",
      "Status":"Deleted",
      "Message": null
    },
    {  
      "EmailAddress":"spammy.address@wildbit.com"
      "Status":"Failed",
      "Message": "You do not have the required authority to change this suppression."
    }
  ]  
}