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 Trust and Safety Write 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:
Accepted Permissions (at least one required)
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"
}