Skip to content
Start here

List abuse reports

client.AbuseReports.List(ctx, params) (*V4PagePagination[AbuseReportListResponse], error)
GET/accounts/{account_id}/abuse-reports

List the abuse reports for a given account

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Trust and Safety WriteTrust and Safety Read
ParametersExpand Collapse
params AbuseReportListParams
AccountID param.Field[string]

Path param: Cloudflare Account ID

maxLength32
CreatedAfter param.Field[string]optional

Query param: Returns reports created after the specified date

CreatedBefore param.Field[string]optional

Query param: Returns reports created before the specified date

Domain param.Field[string]optional

Query param: Filter by domain name related to the abuse report

MitigationStatus param.Field[AbuseReportListParamsMitigationStatus]optional

Query param: Filter reports that have any mitigations in the given status.

const AbuseReportListParamsMitigationStatusPending AbuseReportListParamsMitigationStatus = "pending"
const AbuseReportListParamsMitigationStatusActive AbuseReportListParamsMitigationStatus = "active"
const AbuseReportListParamsMitigationStatusInReview AbuseReportListParamsMitigationStatus = "in_review"
const AbuseReportListParamsMitigationStatusCancelled AbuseReportListParamsMitigationStatus = "cancelled"
const AbuseReportListParamsMitigationStatusRemoved AbuseReportListParamsMitigationStatus = "removed"
Page param.Field[int64]optional

Query param: Where in pagination to start listing abuse reports

PerPage param.Field[int64]optional

Query param: How many abuse reports per page to list

Sort param.Field[string]optional

Query param: A property to sort by, followed by the order (id, cdate, domain, type, status)

Status param.Field[AbuseReportListParamsStatus]optional

Query param: Filter by the status of the report.

const AbuseReportListParamsStatusAccepted AbuseReportListParamsStatus = "accepted"
const AbuseReportListParamsStatusInReview AbuseReportListParamsStatus = "in_review"
Type param.Field[AbuseReportListParamsType]optional

Query param: Filter by the type of the report.

const AbuseReportListParamsTypePhish AbuseReportListParamsType = "PHISH"
const AbuseReportListParamsTypeGen AbuseReportListParamsType = "GEN"
const AbuseReportListParamsTypeThreat AbuseReportListParamsType = "THREAT"
const AbuseReportListParamsTypeDmca AbuseReportListParamsType = "DMCA"
const AbuseReportListParamsTypeEmer AbuseReportListParamsType = "EMER"
const AbuseReportListParamsTypeTm AbuseReportListParamsType = "TM"
const AbuseReportListParamsTypeRegWho AbuseReportListParamsType = "REG_WHO"
const AbuseReportListParamsTypeNcsei AbuseReportListParamsType = "NCSEI"
const AbuseReportListParamsTypeNetwork AbuseReportListParamsType = "NETWORK"
ReturnsExpand Collapse
type AbuseReportListResponse struct{…}
Reports []AbuseReportListResponseReport
ID string

Public facing ID of abuse report, aka abuse_rand.

Cdate string

Creation date of report. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html)

Domain string

Domain that relates to the report.

MitigationSummary AbuseReportListResponseReportsMitigationSummary

A summary of the mitigations related to this report.

AcceptedURLCount int64

How many of the reported URLs were confirmed as abusive.

ActiveCount int64

How many mitigations are active.

ExternalHostNotified bool

Whether the report has been forwarded to an external hosting provider.

InReviewCount int64

How many mitigations are under review.

PendingCount int64

How many mitigations are pending their effective date.

Status AbuseReportListResponseReportsStatus

An enum value that represents the status of an abuse record

One of the following:
const AbuseReportListResponseReportsStatusAccepted AbuseReportListResponseReportsStatus = "accepted"
const AbuseReportListResponseReportsStatusInReview AbuseReportListResponseReportsStatus = "in_review"
Type AbuseReportListResponseReportsType

The abuse report type

One of the following:
const AbuseReportListResponseReportsTypePhish AbuseReportListResponseReportsType = "PHISH"
const AbuseReportListResponseReportsTypeGen AbuseReportListResponseReportsType = "GEN"
const AbuseReportListResponseReportsTypeThreat AbuseReportListResponseReportsType = "THREAT"
const AbuseReportListResponseReportsTypeDmca AbuseReportListResponseReportsType = "DMCA"
const AbuseReportListResponseReportsTypeEmer AbuseReportListResponseReportsType = "EMER"
const AbuseReportListResponseReportsTypeTm AbuseReportListResponseReportsType = "TM"
const AbuseReportListResponseReportsTypeRegWho AbuseReportListResponseReportsType = "REG_WHO"
const AbuseReportListResponseReportsTypeNcsei AbuseReportListResponseReportsType = "NCSEI"
const AbuseReportListResponseReportsTypeNetwork AbuseReportListResponseReportsType = "NETWORK"
Justification stringoptional

Justification for the report.

OriginalWork stringoptional

Original work / Targeted brand in the alleged abuse.

Submitter AbuseReportListResponseReportsSubmitteroptional

Information about the submitter of the report.

Company stringoptional
Email stringoptional
Name stringoptional
Telephone stringoptional
URLs []stringoptional

List abuse reports

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/abuse_reports"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  page, err := client.AbuseReports.List(context.TODO(), abuse_reports.AbuseReportListParams{
    AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "success": true,
  "errors": [
    {
      "message": "message"
    }
  ],
  "messages": [
    {
      "message": "message"
    }
  ],
  "result": {
    "reports": [
      {
        "id": "id",
        "cdate": "2009-11-10T23:00:00Z",
        "domain": "domain",
        "mitigation_summary": {
          "accepted_url_count": 0,
          "active_count": 0,
          "external_host_notified": true,
          "in_review_count": 0,
          "pending_count": 0
        },
        "status": "accepted",
        "type": "PHISH",
        "justification": "justification",
        "original_work": "original_work",
        "submitter": {
          "company": "company",
          "email": "email",
          "name": "name",
          "telephone": "telephone"
        },
        "urls": [
          "string"
        ]
      }
    ]
  },
  "result_info": {
    "count": 0,
    "page": 0,
    "per_page": 0,
    "total_count": 0,
    "total_pages": 0
  }
}
Returns Examples
{
  "success": true,
  "errors": [
    {
      "message": "message"
    }
  ],
  "messages": [
    {
      "message": "message"
    }
  ],
  "result": {
    "reports": [
      {
        "id": "id",
        "cdate": "2009-11-10T23:00:00Z",
        "domain": "domain",
        "mitigation_summary": {
          "accepted_url_count": 0,
          "active_count": 0,
          "external_host_notified": true,
          "in_review_count": 0,
          "pending_count": 0
        },
        "status": "accepted",
        "type": "PHISH",
        "justification": "justification",
        "original_work": "original_work",
        "submitter": {
          "company": "company",
          "email": "email",
          "name": "name",
          "telephone": "telephone"
        },
        "urls": [
          "string"
        ]
      }
    ]
  },
  "result_info": {
    "count": 0,
    "page": 0,
    "per_page": 0,
    "total_count": 0,
    "total_pages": 0
  }
}