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

[Skip to content](#_top)

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

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

[Suppressions](https://developers.cloudflare.com/api/go/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

client.EmailSending.Suppressions.Import(ctx, params) (\*[SuppressionImportResponse](<https://developers.cloudflare.com/api/go/resources/email_sending#(resource)%20email_sending.suppressions%20%3E%20(model)%20SuppressionImportResponse%20%3E%20(schema)>), error)

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

<details>

<summary>

params SuppressionImportParams

</summary>

AccountID param.Field\[string]

Path param: Cloudflare account ID.

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

<details>

<summary>

Items param.Field\[\[]SuppressionImportParamsItem]

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

</summary>

Email string

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>

ExpiresAt TimeOptional

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 stringOptional

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 SuppressionImportParamsItemsScopeOptional

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>

type SuppressionImportParamsItemsScopeType struct{…}

</summary>

Type SuppressionImportParamsItemsScopeTypeType

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>

type SuppressionImportParamsItemsScopeObject struct{…}

</summary>

Type SuppressionImportParamsItemsScopeObjectType

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 string

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>

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

</details>

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

##### ReturnsExpand Collapse

<details>

<summary>

type SuppressionImportResponse struct{…}

</summary>

Deduplicated int64

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)%20SuppressionImportResponse%20%3E%20(schema)%20%3E%20(property)%20deduplicated">Link to this property</a>

Errors int64

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

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

Invalid int64

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

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

<details>

<summary>

Items \[]SuppressionImportResponseItem

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

</summary>

Index int64

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

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20SuppressionImportResponse%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 SuppressionImportResponseItemsStatus

Outcome for this item.

</summary>

One of the following:

const SuppressionImportResponseItemsStatusProcessed SuppressionImportResponseItemsStatus = "processed"

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20SuppressionImportResponse%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>

const SuppressionImportResponseItemsStatusInvalid SuppressionImportResponseItemsStatus = "invalid"

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20SuppressionImportResponse%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>

const SuppressionImportResponseItemsStatusError SuppressionImportResponseItemsStatus = "error"

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20SuppressionImportResponse%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>

const SuppressionImportResponseItemsStatusSkipped SuppressionImportResponseItemsStatus = "skipped"

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20SuppressionImportResponse%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)%20SuppressionImportResponse%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20status">Link to this property</a>

ID stringOptional

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)%20SuppressionImportResponse%20%3E%20(schema)%20%3E%20(property)%20items%20%3E%20(items)%20%3E%20(property)%20id">Link to this property</a>

Email stringOptional

The submitted email address for this item.

formatemail

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

Error stringOptional

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)%20SuppressionImportResponse%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 SuppressionImportResponseItemsScopeOptional

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>

type SuppressionImportResponseItemsScopeType struct{…}

</summary>

Type SuppressionImportResponseItemsScopeTypeType

Blocks the recipient for every sending domain of the account.

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20SuppressionImportResponse%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)%20SuppressionImportResponse%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>

type SuppressionImportResponseItemsScopeObject struct{…}

</summary>

Type SuppressionImportResponseItemsScopeObjectType

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

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20SuppressionImportResponse%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 string

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)%20SuppressionImportResponse%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)%20SuppressionImportResponse%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)%20SuppressionImportResponse%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)%20SuppressionImportResponse%20%3E%20(schema)%20%3E%20(property)%20items">Link to this property</a>

Processed int64

Number of items successfully created or promoted.

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

Skipped int64

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)%20SuppressionImportResponse%20%3E%20(schema)%20%3E%20(property)%20skipped">Link to this property</a>

Total int64

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

<a href="#(resource)%20email_sending.suppressions%20%3E%20(model)%20SuppressionImportResponse%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)%20SuppressionImportResponse%20%3E%20(schema)>)

### Bulk import account Email Sending suppressions

Go

HTTPTypeScriptPythonGoTerraform

```
package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/email_sending"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.EmailSending.Suppressions.Import(context.TODO(), email_sending.SuppressionImportParams{
    AccountID: cloudflare.F("12345678"),
    Items: cloudflare.F([]email_sending.SuppressionImportParamsItem{email_sending.SuppressionImportParamsItem{
      Email: cloudflare.F("user@example.com"),
    }, email_sending.SuppressionImportParamsItem{
      Email: cloudflare.F("other@example.com"),
    }}),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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
}
```