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
}
]
Creates new suppressions by posting to the suppression resource. You can specify different types of suppressions including hardBounce
, manual
, unsubscribe
, and spamComplaint
.
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
}
]
This api key can be used only for sub account level operations
A list of created suppressions
The response is of type object[]
.