Skip to content
Start here

Bulk import account Email Sending suppressions

POST/accounts/{account_id}/email/sending/suppressions/bulk

Imports up to 1,000 account-level Email Sending suppressions in one request.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

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

Example:X-Auth-Email: user@example.com

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

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Path ParametersExpand Collapse
account_id: string
Body ParametersJSONExpand Collapse
items: array of object { email, expires_at, note }
email: string
expires_at: optional string
formatdate-time
note: optional string
maxLength1000
ReturnsExpand Collapse
errors: array of unknown
messages: array of unknown
result: object { deduplicated, errors, invalid, 4 more }
deduplicated: number
errors: number
invalid: number
items: array of object { index, status, id, 2 more }
index: number
status: "processed" or "invalid" or "error" or "skipped"
One of the following:
"processed"
"invalid"
"error"
"skipped"
id: optional string
formatuuid
email: optional string
formatemail
error: optional string
processed: number
skipped: number
total: number
success: boolean

Bulk import account Email Sending suppressions

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/email/sending/suppressions/bulk \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    -d '{
          "items": [
            {
              "email": "email"
            }
          ]
        }'
{
  "errors": [
    {}
  ],
  "messages": [
    {}
  ],
  "result": {
    "deduplicated": 1,
    "errors": 0,
    "invalid": 1,
    "items": [
      {
        "index": 0,
        "status": "processed",
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "email": "user@example.com",
        "error": "Invalid email"
      }
    ],
    "processed": 2,
    "skipped": 0,
    "total": 4
  },
  "success": true
}
Returns Examples
{
  "errors": [
    {}
  ],
  "messages": [
    {}
  ],
  "result": {
    "deduplicated": 1,
    "errors": 0,
    "invalid": 1,
    "items": [
      {
        "index": 0,
        "status": "processed",
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "email": "user@example.com",
        "error": "Invalid email"
      }
    ],
    "processed": 2,
    "skipped": 0,
    "total": 4
  },
  "success": true
}