Skip to content
Start here

Change email classification

email_security.investigate.reclassify.create(strpostfix_id, ReclassifyCreateParams**kwargs) -> object
POST/accounts/{account_id}/email-security/investigate/{postfix_id}/reclassify

Submits an email message for reclassification, updating its threat assessment based on new analysis.

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
postfix_id: str

The identifier of the message.

expected_disposition: Literal["NONE", "BULK", "MALICIOUS", 3 more]
One of the following:
"NONE"
"BULK"
"MALICIOUS"
"SPAM"
"SPOOF"
"SUSPICIOUS"
eml_content: Optional[str]

Base64 encoded content of the EML file

escalated_submission_id: Optional[str]
ReturnsExpand Collapse
object

Change email classification

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
)
reclassify = client.email_security.investigate.reclassify.create(
    postfix_id="4Njp3P0STMz2c02Q",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
    expected_disposition="NONE",
)
print(reclassify)
{
  "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": {},
  "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": {},
  "success": true
}