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.
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. |
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"
SuppressionReason |
Filter by suppression reason. Possible options: |
---|---|
Origin |
Filter by origin of how the address was added to suppression list. Possible options: |
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. |
Suppressions | array |
List of objects that each represent a single suppression. |
---|
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"
}
]
}
Accept |
required application/json |
---|---|
Content-Type |
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. |
curl "https://api.postmarkapp.com/message-streams/{stream_id}/suppressions" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: 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"
}
]
}'
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. |
{
"Suppressions":[
{
"EmailAddress":"good.address@wildbit.com"
},
{
"EmailAddress":"spammy.address@wildbit.com"
},
{
"EmailAddress":"invalid-email-address"
}
]
}
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: |
Message | string |
If address cannot be suppressed (Status: |
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."
}
]
}
SpamComplaint
suppressions cannot be deleted.
Accept |
required application/json |
---|---|
Content-Type |
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. |
curl "https://api.postmarkapp.com/message-streams/{stream_id}/suppressions/delete" \
-X POST \
-H "Accept: application/json" \
-H "Content-Type: 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"
}
]
}'
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. |
{
"Suppressions":[
{
"EmailAddress":"good.address@wildbit.com"
},
{
"EmailAddress":"not.suppressed@wildbit.com"
},
{
"EmailAddress":"spammy.address@wildbit.com"
}
]
}
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: |
Message | string |
If address cannot be deleted (Status: Failed), the cause for failure is listed. If suppression deletion Status is successful (Status: |
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."
}
]
}