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

Response

200 - application/json

A list of created suppressions

The response is of type object[].