## Submit an abuse report `client.AbuseReports.New(ctx, reportParam, params) (*string, error)` **post** `/accounts/{account_id}/abuse-reports/{report_param}` Submit the Abuse Report of a particular type ### Parameters - `reportParam string` The report type for submitted reports. - `params AbuseReportNewParams` - `AccountID param.Field[string]` Path param: Cloudflare Account ID - `Act param.Field[AbuseReportNewParamsAbuseReportsDmcaReportAct]` Body param: The report type for submitted reports. - `const AbuseReportNewParamsAbuseReportsDmcaReportActAbuseDmca AbuseReportNewParamsAbuseReportsDmcaReportAct = "abuse_dmca"` - `Address1 param.Field[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/). - `AgentName param.Field[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/). - `Agree param.Field[AbuseReportNewParamsAbuseReportsDmcaReportAgree]` Body param: Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports - `const AbuseReportNewParamsAbuseReportsDmcaReportAgree1 AbuseReportNewParamsAbuseReportsDmcaReportAgree = 1` - `City param.Field[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/). - `Country param.Field[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/). - `Email param.Field[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 param.Field[string]` Body param: Should match the value provided in `email` - `HostNotification param.Field[AbuseReportNewParamsAbuseReportsDmcaReportHostNotification]` Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - `const AbuseReportNewParamsAbuseReportsDmcaReportHostNotificationSend AbuseReportNewParamsAbuseReportsDmcaReportHostNotification = "send"` - `Name param.Field[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/). - `OriginalWork param.Field[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/). - `OwnerNotification param.Field[AbuseReportNewParamsAbuseReportsDmcaReportOwnerNotification]` Body param: Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. - `const AbuseReportNewParamsAbuseReportsDmcaReportOwnerNotificationSend AbuseReportNewParamsAbuseReportsDmcaReportOwnerNotification = "send"` - `Signature param.Field[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 param.Field[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/). - `URLs param.Field[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 param.Field[string]` Body param: Any additional comments about the infringement not exceeding 2000 characters - `Company param.Field[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/). - `ReportedCountry param.Field[string]` Body param: Text containing 2 characters - `ReportedUserAgent param.Field[string]` Body param: Text not exceeding 255 characters - `Tele param.Field[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/). - `Title param.Field[string]` Body param: Text not exceeding 255 characters ### Returns - `type AbuseReportNewResponseEnvelopeResult string` The result should be 'success' for successful response ### Example ```go 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) } ``` #### Response ```json { "abuse_rand": "abuse_rand", "request": { "act": "act" }, "result": "result" } ```