---
title: Code Examples
slug: integration-settings-code-examples
docTags: 
createdAt: 2026-06-16T03:07:41.730Z
---

:::hint{type="warning"}
## Legacy API — sunsets June 1, 2027

This page documents the original mailfloss API, which is being retired on **June 1, 2027**. New integrations should use the [v1 API](https://developers.mailfloss.com/quickstart).
:::

## Add blacklist endpoint

```shell
curl -X POST \
  --url https://api.mailfloss.com/settings/{id}?api_key={api_key} \
  -d '{"type": "blacklist","data":{
 "keyword": "mailfloss.com",
 "localpart": false,
 "domain": true,
 "email": false,
 "match": "exact",
 }}' -H "Content-Type: application/json"
```

## Bulk add blacklist endpoint

```shell
curl -X POST \
  --url https://api.mailfloss.com/settings/{id}?api_key={api_key} \
  -d '{"type": "blacklist", "data":[{
 "keyword": "mailfloss.net",
 "localpart": false,
 "domain": true,
 "email": false,
 "match": "exact"
 }, {
 "keyword": "mailfloss.io",
 "localpart": false,
 "domain": true,
 "email": false,
 "match": "exact"
 }, {
 "keyword": "mailfloss.us",
 "localpart": false,
 "domain": true,
 "email": false,
 "match": "exact"
 }]}' -H "Content-Type: application/json"
```
