Submit an abuse report
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).
Delegated reports: In limited circumstances, Cloudflare works with
select customers who have established abuse-handling programs. For
these customers, Cloudflare may forward abuse reports directly and in
full—including reporter contact information, comments, and supporting
evidence—without redaction or preprocessing by Cloudflare. This allows
the customer to investigate and respond using their own policies and
processes. For delegated reports, the report—including contact
information and comments—will be forwarded to the customer in full
regardless of the host_notification and owner_notification values.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Accepted Permissions (at least one required)
Submit an abuse report
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"),
)
abuseReport, err := client.AbuseReports.New(
context.TODO(),
"report_param",
abuse_reports.AbuseReportNewParams{
AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
Body: abuse_reports.AbuseReportNewParamsBodyAbuseReportsDmcaReport{
Act: cloudflare.F(abuse_reports.AbuseReportNewParamsBodyAbuseReportsDmcaReportActAbuseDmca),
Address1: cloudflare.F("x"),
AgentName: cloudflare.F("x"),
Agree: cloudflare.F(abuse_reports.AbuseReportNewParamsBodyAbuseReportsDmcaReportAgree1),
City: cloudflare.F("x"),
Country: cloudflare.F("x"),
Email: cloudflare.F("email"),
Email2: cloudflare.F("email2"),
HostNotification: cloudflare.F(abuse_reports.AbuseReportNewParamsBodyAbuseReportsDmcaReportHostNotificationSend),
Name: cloudflare.F("x"),
OriginalWork: cloudflare.F("x"),
OwnerNotification: cloudflare.F(abuse_reports.AbuseReportNewParamsBodyAbuseReportsDmcaReportOwnerNotificationSend),
Signature: cloudflare.F("signature"),
State: cloudflare.F("x"),
URLs: cloudflare.F("urls"),
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", abuseReport)
}
{
"abuse_rand": "abuse_rand",
"request": {
"act": "act"
},
"result": "result"
}Returns Examples
{
"abuse_rand": "abuse_rand",
"request": {
"act": "act"
},
"result": "result"
}