# 送信停止リストに追加する

Source: https://won.dev/ja/docs/email/suppressions-add

`POST https://api.won.dev/v1/email/suppressions`

アドレスや企業のドメイン全体を送信停止リストに追加します。既存の顧客、競合、ほかの場所で連絡しないでほしいと言った人などです。次のメールから、実行中のものを含むすべてのキャンペーンで効きます。`sender_id` をつけると、その送信者のキャンペーンでだけ効きます。同じものを2回追加しても何も変わりません。1回の呼び出しで最大1,000件のアドレスと100件のドメインまで追加できます。テストキーには専用のリストがあり、本番のキャンペーンはそれに従いません。無料です。

- **課金：** 無料。

テストキー（`won_test_...`）では、これは[サンドボックス](/ja/docs/email#sandbox)で動きます。何も送信されず、課金もされません。

## パラメーター [#parameters]

パラメーターはJSONのリクエストボディで渡します。`POST` リクエストでは `Idempotency-Key` ヘッダーも使えます。[同じリクエストを2回送ったとき](/ja/docs/email#idempotency)を参照してください。

| パラメーター | 型 | 必須 | 説明（APIの原文） |
| --- | --- | --- | --- |
| `emails` | string[] | いいえ | Addresses never to write to, such as `lee.park@coastal-office.example`. |
| `domains` | string[] | いいえ | Company domains never to write to, such as `coastal-office.example`: every address at them is left out. Mail services such as gmail.com cannot be suppressed as a whole. |
| `sender_id` | string | いいえ | Hold them back from this sender's campaigns only, such as `snd_4k2m9x7p1q8w3e5r`. Without it, from all of yours. |

## レスポンス [#response]

エラーについては[エラーコード](/ja/docs/errors)を参照してください。

| フィールド | 型 | 説明（APIの原文） |
| --- | --- | --- |
| `data` | object | What became of the entries. |
| `data.added` | integer | Entries that are new on the list. |
| `data.already_listed` | integer | Entries that were on the list already. |
| `data.rejected` | object[] | Entries that were not added, each with the reason. |
| `data.rejected[].value` | string |  |
| `data.rejected[].message` | string |  |
| `notice` | string \| null | A plain sentence when there is something to know about this answer. Null otherwise. |
| `usage` | object | Nothing is charged here. The balance, for reference. |
| `usage.cost` | number | What this call cost, in US dollars. |
| `usage.balance` | number | The balance left after this call, in US dollars. |
| `usage.replayed` | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |

## 例 [#example]

```bash
curl https://api.won.dev/v1/email/suppressions \
  -H "Authorization: Bearer $WON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "emails": [
    "lee.park@coastal-office.example"
  ],
  "domains": [
    "brightdesk.example"
  ]
}'
```

```json
{
  "data": {
    "added": 2,
    "already_listed": 0,
    "rejected": []
  },
  "notice": null,
  "usage": {
    "cost": 0,
    "balance": 48.08,
    "replayed": false
  }
}
```