Add suppression
curl --request POST \
--url https://api.moonemail.co/suppressions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"reason": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>', reason: '<string>'})
};
fetch('https://api.moonemail.co/suppressions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.moonemail.co/suppressions"
payload = {
"email": "<string>",
"reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "suppression",
"email": "<string>"
}{
"statusCode": 123,
"name": "<string>",
"message": "<string>"
}Suppressions
Add suppression
Prevent sending to a recipient.
Required permission: suppressions:write.
POST
/
suppressions
Add suppression
curl --request POST \
--url https://api.moonemail.co/suppressions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"reason": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: '<string>', reason: '<string>'})
};
fetch('https://api.moonemail.co/suppressions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.moonemail.co/suppressions"
payload = {
"email": "<string>",
"reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "suppression",
"email": "<string>"
}{
"statusCode": 123,
"name": "<string>",
"message": "<string>"
}