Skip to content
Start here

Submit an abuse report

client.abuseReports.create(stringreportParam, AbuseReportCreateParamsparams, RequestOptionsoptions?): AbuseReportCreateResponse
POST/accounts/{account_id}/abuse-reports/{report_param}

Submit an abuse report of a particular type.

Requires the abuse-reports entitlement on the account (Enterprise accounts have it by default; other accounts must request access) and an API token with the Account > Abuse Reports > Edit permission. If the account is not entitled, the request is rejected with an HTTP 401 response (see below).

Security

API Token

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

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
ParametersExpand Collapse
reportParam: string

The report type for submitted reports.

AbuseReportCreateParams = AbuseReportsDmcaReport | AbuseReportsTrademarkReport | AbuseReportsGeneralReport | 5 more
AbuseReportCreateParamsBase { account_id, act, address1, 19 more }
account_id: string

Path param: Cloudflare Account ID

maxLength32
act: "abuse_dmca"

Body param: The report type for submitted reports.

address1: string

Body param: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).

maxLength100
minLength1
agent_name: string

Body param: The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).

maxLength60
minLength1
agree: 1

Body param: Can be 0 for false or 1 for true. Must be value: 1 for DMCA reports

city: string

Body param: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).

maxLength255
minLength1
country: string

Body param: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).

maxLength255
minLength1
email: string

Body param: A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).

email2: string

Body param: Should match the value provided in email

host_notification: "send"

Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.

name: string

Body param: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).

maxLength255
minLength1
original_work: string

Body param: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).

maxLength255
minLength1
owner_notification: "send"

Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.

signature: string

Body param: Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare’s abuse reports

state: string

Body param: Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).

maxLength255
minLength1
urls: string

Body param: A list of valid URLs separated by ‘\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).

comments?: string

Body param: Any additional comments about the infringement not exceeding 2000 characters

maxLength2000
minLength1
company?: string

Body param: Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).

maxLength100
minLength1
reported_country?: string

Body param: Text containing 2 characters

maxLength2
minLength2
reported_user_agent?: string

Body param: Text not exceeding 255 characters

maxLength255
minLength1
tele?: string

Body param: Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).

maxLength20
minLength1
title?: string

Body param: Text not exceeding 255 characters

maxLength255
minLength1
AbuseReportsDmcaReport extends AbuseReportCreateParamsBase { account_id, act, address1, 19 more }
AbuseReportsTrademarkReport extends AbuseReportCreateParamsBase { account_id, act, address1, 19 more }
AbuseReportsGeneralReport extends AbuseReportCreateParamsBase { account_id, act, address1, 19 more }
AbuseReportsPhishingReport extends AbuseReportCreateParamsBase { account_id, act, address1, 19 more }
AbuseReportsCsamReport extends AbuseReportCreateParamsBase { account_id, act, address1, 19 more }
AbuseReportsThreatReport extends AbuseReportCreateParamsBase { account_id, act, address1, 19 more }
AbuseReportsRegistrarWhoisReport extends AbuseReportCreateParamsBase { account_id, act, address1, 19 more }
AbuseReportsNcseiReport extends AbuseReportCreateParamsBase { account_id, act, address1, 19 more }
ReturnsExpand Collapse
AbuseReportCreateResponse = string

The result should be ‘success’ for successful response

Submit an abuse report

import Cloudflare from 'cloudflare';

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

const abuseReport = await client.abuseReports.create('report_param', {
  account_id: '023e105f4ecef8ad9ca31a8372d0c353',
  act: 'abuse_dmca',
  address1: 'x',
  agent_name: 'x',
  agree: 1,
  city: 'x',
  country: 'x',
  email: 'email',
  email2: 'email2',
  host_notification: 'send',
  name: 'x',
  original_work: 'x',
  owner_notification: 'send',
  signature: 'signature',
  state: 'x',
  urls: 'urls',
});

console.log(abuseReport);
{
  "abuse_rand": "abuse_rand",
  "request": {
    "act": "act"
  },
  "result": "result"
}
Returns Examples
{
  "abuse_rand": "abuse_rand",
  "request": {
    "act": "act"
  },
  "result": "result"
}