Skip to content
Start here

Get PhishGuard reports

client.emailSecurity.phishguard.reports.list(ReportListParams { account_id, end, from_date, 2 more } params, RequestOptionsoptions?): SinglePage<ReportListResponse { id, content, disposition, 7 more } >
GET/accounts/{account_id}/email-security/phishguard/reports

Retrieves PhishGuard security alert reports for a specified date range. Reports include detected threats, dispositions, and contextual information. Use for security monitoring and threat analysis.

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
Accepted Permissions (at least one required)
Cloud Email Security: WriteCloud Email Security: Read
ParametersExpand Collapse
params: ReportListParams { account_id, end, from_date, 2 more }
account_id: string

Path param: Identifier.

maxLength32
end?: string

Query param: End of the time range (RFC3339). Takes precedence over to_date.

formatdate-time
from_date?: string

Query param: Deprecated, use start instead. Start date in YYYY-MM-DD format.

formatdate
start?: string

Query param: Start of the time range (RFC3339). Takes precedence over from_date.

formatdate-time
to_date?: string

Query param: Deprecated, use end instead. End date in YYYY-MM-DD format.

formatdate
ReturnsExpand Collapse
ReportListResponse { id, content, disposition, 7 more }
id: number
content: string
disposition: "MALICIOUS" | "MALICIOUS-BEC" | "SUSPICIOUS" | 7 more
One of the following:
"MALICIOUS"
"MALICIOUS-BEC"
"SUSPICIOUS"
"SPOOF"
"SPAM"
"BULK"
"ENCRYPTED"
"EXTERNAL"
"UNKNOWN"
"NONE"
fields: Fields { to, from, occurred_at, 2 more }
to: Array<string>
from?: string | null
occurred_at?: string
formatdate-time
postfix_id?: string | null
Deprecatedts?: string

Deprecated, use occurred_at instead

formatdate-time
priority: string
title: string
created_at?: string | null
formatdate-time
tags?: Array<Tag> | null
category: string
value: string
Deprecatedts?: string

Deprecated, use created_at instead

formatdate-time
updated_at?: string | null
formatdate-time

Get PhishGuard reports

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const reportListResponse of client.emailSecurity.phishguard.reports.list({
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
})) {
  console.log(reportListResponse.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": 0,
      "content": "content",
      "disposition": "MALICIOUS",
      "fields": {
        "to": [
          "string"
        ],
        "from": "from",
        "occurred_at": "2019-12-27T18:11:19.117Z",
        "postfix_id": "postfix_id",
        "ts": "2019-12-27T18:11:19.117Z"
      },
      "priority": "priority",
      "title": "title",
      "created_at": "2019-12-27T18:11:19.117Z",
      "tags": [
        {
          "category": "category",
          "value": "value"
        }
      ],
      "ts": "2019-12-27T18:11:19.117Z",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "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": 0,
      "content": "content",
      "disposition": "MALICIOUS",
      "fields": {
        "to": [
          "string"
        ],
        "from": "from",
        "occurred_at": "2019-12-27T18:11:19.117Z",
        "postfix_id": "postfix_id",
        "ts": "2019-12-27T18:11:19.117Z"
      },
      "priority": "priority",
      "title": "title",
      "created_at": "2019-12-27T18:11:19.117Z",
      "tags": [
        {
          "category": "category",
          "value": "value"
        }
      ],
      "ts": "2019-12-27T18:11:19.117Z",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "success": true
}