---
title: Bulk import account Email Sending suppressions
---

[Skip to content](#_top)

[API Reference](https://developers.cloudflare.com/api/python)

[Email Sending](https://developers.cloudflare.com/api/python/resources/email_sending)

[Suppressions](https://developers.cloudflare.com/api/python/resources/email_sending/subresources/suppressions)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# Bulk import account Email Sending suppressions

email\_sending.suppressions.import\_(SuppressionImportParams\*\*kwargs) -> [SuppressionImportResponse](<https://developers.cloudflare.com/api/python/resources/email_sending#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)>)

POST/accounts/{account\_id}/email/sending/suppressions/bulk

Imports up to 1,000 Email Sending suppressions in one request. Each item applies to every sending domain of the account (default) or to one sending domain.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### ParametersExpand Collapse

account\_id: str

Cloudflare account ID.

[Link to this property](<#(resource)%20email_sending.suppressions%20%3E%20(method)%20import%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

<details>

<summary>

items: Iterable\[Item]

Suppressions to import. Items with the same email address and scope are deduplicated before processing.

</summary>

email: str

The email address to suppress.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(method)%20import%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20email">Link to this property</a>

expires\_at: Optional\[Union\[str, datetime, null]]

Expiration timestamp for the suppression. Omit or set to null for a permanent suppression that never expires.

formatdate-time

<a href="#(resource)%20email_sending.suppressions%20%3E%20(method)%20import%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20expires_at">Link to this property</a>

note: Optional\[str]

Advisory note for this suppression. Not enforced or validated beyond length.

maxLength1000

<a href="#(resource)%20email_sending.suppressions%20%3E%20(method)%20import%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20note">Link to this property</a>

<details>

<summary>

scope: Optional\[ItemScope]

Where the suppression applies. Omit for <code>{ "type": "account" }</code>, which blocks the recipient for every sending domain of the account.

</summary>

One of the following:

<details>

<summary>

class ItemScopeType: …

</summary>

type: Literal\["account"]

Blocks the recipient for every sending domain of the account.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(method)%20import%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20scope%20%3E%20(variant)%200%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.suppressions%20%3E%20(method)%20import%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20scope%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class ItemScopeUnionMember1: …

</summary>

type: Literal\["sending\_domain"]

Blocks the recipient only for mail whose envelope MAIL FROM uses <code>value</code>.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(method)%20import%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20scope%20%3E%20(variant)%201%20%3E%20(property)%20type">Link to this property</a>

value: str

The sending domain to suppress for: the domain part of the envelope MAIL FROM. It is lowercased and trailing dots are removed. Internationalized domains must use the ASCII (punycode) form. Ownership is not checked; a domain the account does not send from never matches.

maxLength1024

<a href="#(resource)%20email_sending.suppressions%20%3E%20(method)%20import%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20scope%20%3E%20(variant)%201%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.suppressions%20%3E%20(method)%20import%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20scope%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.suppressions%20%3E%20(method)%20import%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)%20%3E%20(items)%20%3E%20(property)%20scope">Link to this property</a>

</details>

[Link to this property](<#(resource)%20email_sending.suppressions%20%3E%20(method)%20import%20%3E%20(params)%20default%20%3E%20(param)%20items%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class SuppressionImportResponse: …

</summary>

deduplicated: int

Number of items dropped because their email address and scope repeated an earlier item in this request. Counted once and excluded from <code>items</code>.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20deduplicated">Link to this property</a>

errors: int

Number of items that failed to import due to an unexpected error.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20errors">Link to this property</a>

invalid: int

Number of items with an invalid email address or sending domain.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20invalid">Link to this property</a>

<details>

<summary>

items: List\[Item]

Per-item results, in the same order as the request body.

</summary>

index: int

Zero-based index of this item in the request body.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20index">Link to this property</a>

<details>

<summary>

status: Literal\["processed", "invalid", "error", "skipped"]

Outcome for this item.

</summary>

One of the following:

"processed"

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(member)%200">Link to this property</a>

"invalid"

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(member)%201">Link to this property</a>

"error"

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(member)%202">Link to this property</a>

"skipped"

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20status%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20status">Link to this property</a>

id: Optional\[str]

The created or promoted suppression’s identifier. Present when <code>status</code> is <code>processed</code>.

formatuuid

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

email: Optional\[str]

The submitted email address for this item.

formatemail

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20email">Link to this property</a>

error: Optional\[str]

Human-readable error message. Present when <code>status</code> is <code>invalid</code>, <code>error</code>, or <code>skipped</code>.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20error">Link to this property</a>

<details>

<summary>

scope: Optional\[ItemScope]

Where the suppression applies: <code>account</code> for every sending domain of the account, or <code>sending_domain</code> for one envelope MAIL FROM domain.

</summary>

One of the following:

<details>

<summary>

class ItemScopeType: …

</summary>

type: Literal\["account"]

Blocks the recipient for every sending domain of the account.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20scope%20%3E%20(variant)%200%20%3E%20(property)%20type">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20scope%20%3E%20(variant)%200">Link to this property</a>

<details>

<summary>

class ItemScopeUnionMember1: …

</summary>

type: Literal\["sending\_domain"]

Blocks the recipient only for mail whose envelope MAIL FROM uses <code>value</code>.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20scope%20%3E%20(variant)%201%20%3E%20(property)%20type">Link to this property</a>

value: str

The sending domain: the domain part of the envelope MAIL FROM, lowercase, without a trailing dot.

maxLength1024

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20scope%20%3E%20(variant)%201%20%3E%20(property)%20value">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20scope%20%3E%20(variant)%201">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20scope">Link to this property</a>

</details>

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20items">Link to this property</a>

processed: int

Number of items successfully created or promoted.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20processed">Link to this property</a>

skipped: int

Number of items skipped because the existing suppression is not customer-managed (for example, a read-only policy suppression).

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20skipped">Link to this property</a>

total: int

Total number of items in the request body, including duplicates.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)%20%3E%20(property)%20total">Link to this property</a>

</details>

[Link to this property](<#(resource)%20email_sending.suppressions%20%3E%20(model)%20suppression_import_response%20%3E%20(schema)>)

### Bulk import account Email Sending suppressions

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
response = client.email_sending.suppressions.import_(
    account_id="12345678",
    items=[{
        "email": "user@example.com"
    }, {
        "email": "other@example.com"
    }],
)
print(response.invalid)
```

200 example

```
{
  "errors": [
    {}
  ],
  "messages": [
    {}
  ],
  "result": {
    "deduplicated": 1,
    "errors": 0,
    "invalid": 1,
    "items": [
      {
        "index": 0,
        "status": "processed",
        "id": "396a5436-d4b0-42a6-b3fc-48e8fa522321",
        "email": "user@example.com",
        "error": "Invalid email",
        "scope": {
          "type": "sending_domain",
          "value": "mail.example.com"
        }
      }
    ],
    "processed": 2,
    "skipped": 0,
    "total": 4
  },
  "success": true
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {}
  ],
  "messages": [
    {}
  ],
  "result": {
    "deduplicated": 1,
    "errors": 0,
    "invalid": 1,
    "items": [
      {
        "index": 0,
        "status": "processed",
        "id": "396a5436-d4b0-42a6-b3fc-48e8fa522321",
        "email": "user@example.com",
        "error": "Invalid email",
        "scope": {
          "type": "sending_domain",
          "value": "mail.example.com"
        }
      }
    ],
    "processed": 2,
    "skipped": 0,
    "total": 4
  },
  "success": true
}
```