Skip to content
Start here

Change email classification

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
Path ParametersExpand Collapse
account_id: optional string

Account Identifier

maxLength32
minLength32
postfix_id: string

The identifier of the message.

Query ParametersExpand Collapse
submission: optional boolean

When true, search the submissions datastore only. When false or omitted, search the regular datastore only.

Body ParametersJSONExpand Collapse
expected_disposition: "NONE" or "BULK" or "MALICIOUS" or 3 more
One of the following:
"NONE"
"BULK"
"MALICIOUS"
"SPAM"
"SPOOF"
"SUSPICIOUS"
eml_content: optional string

Base64 encoded content of the EML file

escalated_submission_id: optional string
ReturnsExpand Collapse
errors: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of ResponseInfo { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
result: unknown
success: boolean

Change email classification

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/email-security/investigate/$POSTFIX_ID/reclassify \
    -H 'Content-Type: application/json' \
    -H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
    -H "X-Auth-Key: $CLOUDFLARE_API_KEY" \
    -d '{
          "expected_disposition": "NONE"
        }'
{
  "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
}