Skip to main content
POST
/
subaccount
/
suppression
Create 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": "[email protected]"
    }
  ],
  "manual": [
    {
      "email": "[email protected]"
    }
  ],
  "unsubscribe": [
    {
      "email": "[email protected]"
    }
  ],
  "spamComplaint": [
    {
      "email": "[email protected]"
    }
  ]
}
'
[
  {
    "id": 37,
    "reason": 2,
    "email": "[email protected]",
    "created": 1567512491588025000
  },
  {
    "id": 39,
    "reason": 2,
    "email": "[email protected]",
    "created": 1567512491588025000
  },
  {
    "id": 40,
    "reason": 0,
    "email": "[email protected]",
    "created": 1567512491588025000
  },
  {
    "id": 44,
    "reason": 1,
    "email": "[email protected]",
    "created": 1567512491588026600
  },
  {
    "id": 57,
    "reason": 3,
    "email": "[email protected]",
    "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)

smtp_error
string

SMTP error code in case of hard bounce suppression

email
string

The email address for the suppression

created
integer<int64>

UNIX epoch nano timestamp when the suppression was created