Skip to main content
POST
/
subaccount
/
suppression
Create new suppressions
curl --request POST \
  --url https://api.sendpost.io/api/v1/subaccount/suppression \
  --header 'Content-Type: application/json' \
  --header 'X-SubAccount-ApiKey: <api-key>' \
  --data '{
  "hardBounce": [
    {
      "email": "jackbarker@hooli.com"
    }
  ],
  "manual": [
    {
      "email": "russhannelman@gmail.com"
    }
  ],
  "unsubscribe": [
    {
      "email": "jared@piedpiper.com"
    }
  ],
  "spamComplaint": [
    {
      "email": "gilfoyle@piedpiper.com"
    }
  ]
}'
[
  {
    "id": 37,
    "reason": 2,
    "email": "jackbarker@hooli.com",
    "created": 1567512491588025000
  },
  {
    "id": 39,
    "reason": 2,
    "email": "bighead@hooli.com",
    "created": 1567512491588025000
  },
  {
    "id": 40,
    "reason": 0,
    "email": "russhannelman@gmail.com",
    "created": 1567512491588025000
  },
  {
    "id": 44,
    "reason": 1,
    "email": "jared@piedpiper.com",
    "created": 1567512491588026600
  },
  {
    "id": 57,
    "reason": 3,
    "email": "gilfoyle@piedpiper.com",
    "created": 1567512491588028200
  }
]

Authorizations

X-SubAccount-ApiKey
string
header
required

This api key can be used only for sub account level operations

Body

application/json
hardBounce
object[]

list of email addresses which you want to mark in hardBounce suppression list

manual
object[]

list of email addresses which you want to mark in manual suppression list

unsubscribe
object[]

list of email addresses which you want to mark in unsubscribe suppression list

spamComplaint
object[]

list of email addresses which you want to mark in spamComplaint suppression list

Response

200 - application/json

A list of created suppressions

id
integer

The ID of the suppression

reason
integer

The reason for the suppression (0 = manual, 1 = unsubscribe, 2 = hard bounce, 3 = spam complaint)

email
string

The email address for the suppression

created
integer

UNIX epoch nano timestamp when the suppression was created

I