Skip to content
Start here

Release messages from quarantine

email_security.investigate.release.bulk(ReleaseBulkParams**kwargs) -> SyncSinglePage[ReleaseBulkResponse]
POST/accounts/{account_id}/email-security/investigate/release

Releases a quarantined email message, allowing it to be delivered to the recipient.

Security

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
Accepted Permissions (at least one required)
Cloud Email Security: Write
ParametersExpand Collapse
account_id: str

Account Identifier

maxLength32
minLength32
body: Sequence[str]

A list of messages identfied by their postfix_ids that should be released.

ReturnsExpand Collapse
class ReleaseBulkResponse:
id: str
postfix_id: str

The identifier of the message.

delivered: Optional[List[str]]
failed: Optional[List[str]]
undelivered: Optional[List[str]]

Release messages from quarantine

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_email=os.environ.get("CLOUDFLARE_EMAIL"),  # This is the default and can be omitted
    api_key=os.environ.get("CLOUDFLARE_API_KEY"),  # This is the default and can be omitted
)
page = client.email_security.investigate.release.bulk(
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
    body=["4Njp3P0STMz2c02Q"],
)
page = page.result[0]
print(page.id)
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "id",
      "postfix_id": "4Njp3P0STMz2c02Q",
      "delivered": [
        "string"
      ],
      "failed": [
        "string"
      ],
      "undelivered": [
        "string"
      ]
    }
  ],
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "result": [
    {
      "id": "id",
      "postfix_id": "4Njp3P0STMz2c02Q",
      "delivered": [
        "string"
      ],
      "failed": [
        "string"
      ],
      "undelivered": [
        "string"
      ]
    }
  ],
  "success": true
}