Skip to content
Start here

Create new submissions

POST/accounts/{account_id}/email-security/submissions

Submits messages for reclassification or to report missed detections.

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

Identifier.

maxLength32
Body ParametersJSONExpand Collapse
body: object { messages, type } or object { messages, type }
One of the following:
Reclassification object { messages, type }
messages: array of object { alert_id, expected_disposition, escalated_submission_id }
alert_id: string

Alert ID of the detection to reclassify.

expected_disposition: "MALICIOUS" or "SUSPICIOUS" or "SPOOF" or 3 more

The disposition a message is submitted to have.

One of the following:
"MALICIOUS"
"SUSPICIOUS"
"SPOOF"
"SPAM"
"BULK"
"NONE"
escalated_submission_id: optional string

Submission ID of the original user submission, when reclassifying an escalated user report.

type: "reclassification"
MissedDetection object { messages, type }
messages: array of object { expected_disposition, message_id, postfix_id, 3 more }
expected_disposition: "MALICIOUS" or "SUSPICIOUS" or "SPOOF" or 3 more

The disposition a message is submitted to have.

One of the following:
"MALICIOUS"
"SUSPICIOUS"
"SPOOF"
"SPAM"
"BULK"
"NONE"
message_id: string

Message-ID header value of the reported message.

postfix_id: string

The identifier of the message.

recipient_emails: array of string

Recipient email addresses of the reported message.

eml_content: optional string

Base64 encoded content of the EML file.

escalated_submission_id: optional string

Submission ID of the original user submission, when escalating an escalated user report.

type: "missed_detection"
ReturnsExpand Collapse
errors: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
messages: array of object { code, message, documentation_url, source }
code: number
minimum1000
message: string
documentation_url: optional string
source: optional object { pointer }
pointer: optional string
result: object { results }
results: array of object { id, accepted, error }
id: string
accepted: boolean
error: optional string
success: true

Whether the API call was successful.

Create new submissions

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/email-security/submissions \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
    -d '{
          "messages": [
            {
              "alert_id": "alert_id",
              "expected_disposition": "MALICIOUS"
            }
          ],
          "type": "reclassification"
        }'
{
  "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": {
    "results": [
      {
        "id": "id",
        "accepted": true,
        "error": "error"
      }
    ]
  },
  "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": {
    "results": [
      {
        "id": "id",
        "accepted": true,
        "error": "error"
      }
    ]
  },
  "success": true
}