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 the Abuse Report of a particular type

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
AbuseReportsDmcaReport extends AbuseReportCreateParamsBase
AbuseReportsTrademarkReport extends AbuseReportCreateParamsBase
AbuseReportsGeneralReport extends AbuseReportCreateParamsBase
AbuseReportsPhishingReport extends AbuseReportCreateParamsBase
AbuseReportsCsamReport extends AbuseReportCreateParamsBase
AbuseReportsThreatReport extends AbuseReportCreateParamsBase
AbuseReportsRegistrarWhoisReport extends AbuseReportCreateParamsBase
AbuseReportsNcseiReport extends AbuseReportCreateParamsBase
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"
}