Skip to content
Start here

Get email trace

GET/accounts/{account_id}/email-security/investigate/{postfix_id}/trace

Gets the delivery trace for an email message, showing its path through email security processing.

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: WriteCloud Email Security: Read
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.

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: object { inbound, outbound }
inbound: object { lines, pending }
lines: optional array of object { lineno, message, ts }
lineno: number
formatint64
message: string
ts: string
formatdate-time
pending: optional boolean
outbound: object { lines, pending }
lines: optional array of object { lineno, message, ts }
lineno: number
formatint64
message: string
ts: string
formatdate-time
pending: optional boolean
success: boolean

Get email trace

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/email-security/investigate/$POSTFIX_ID/trace \
    -H "X-Auth-Email: $CLOUDFLARE_EMAIL" \
    -H "X-Auth-Key: $CLOUDFLARE_API_KEY"
{
  "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": {
    "inbound": {
      "lines": [
        {
          "lineno": 0,
          "message": "message",
          "ts": "2019-12-27T18:11:19.117Z"
        }
      ],
      "pending": true
    },
    "outbound": {
      "lines": [
        {
          "lineno": 0,
          "message": "message",
          "ts": "2019-12-27T18:11:19.117Z"
        }
      ],
      "pending": true
    }
  },
  "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": {
    "inbound": {
      "lines": [
        {
          "lineno": 0,
          "message": "message",
          "ts": "2019-12-27T18:11:19.117Z"
        }
      ],
      "pending": true
    },
    "outbound": {
      "lines": [
        {
          "lineno": 0,
          "message": "message",
          "ts": "2019-12-27T18:11:19.117Z"
        }
      ],
      "pending": true
    }
  },
  "success": true
}