# Abuse Reports ## Submit an abuse report `client.AbuseReports.New(ctx, reportParam, params) (*string, error)` **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). ### 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" } ``` ## Abuse Report Details `client.AbuseReports.Get(ctx, reportParam, query) (*AbuseReportGetResponse, error)` **get** `/accounts/{account_id}/abuse-reports/{report_param}` Retrieve the details of an abuse report. ### Parameters - `reportParam string` - `query AbuseReportGetParams` - `AccountID param.Field[string]` Cloudflare Account ID ### Returns - `type AbuseReportGetResponse struct{…}` - `ID string` Public facing ID of abuse report, aka abuse_rand. - `Cdate string` Creation date of report. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `Domain string` Domain that relates to the report. - `MitigationSummary AbuseReportGetResponseMitigationSummary` A summary of the mitigations related to this report. - `AcceptedURLCount int64` How many of the reported URLs were confirmed as abusive. - `ActiveCount int64` How many mitigations are active. - `ExternalHostNotified bool` Whether the report has been forwarded to an external hosting provider. - `InReviewCount int64` How many mitigations are under review. - `PendingCount int64` How many mitigations are pending their effective date. - `Status AbuseReportGetResponseStatus` An enum value that represents the status of an abuse record - `const AbuseReportGetResponseStatusAccepted AbuseReportGetResponseStatus = "accepted"` - `const AbuseReportGetResponseStatusInReview AbuseReportGetResponseStatus = "in_review"` - `Type AbuseReportGetResponseType` The abuse report type - `const AbuseReportGetResponseTypePhish AbuseReportGetResponseType = "PHISH"` - `const AbuseReportGetResponseTypeGen AbuseReportGetResponseType = "GEN"` - `const AbuseReportGetResponseTypeThreat AbuseReportGetResponseType = "THREAT"` - `const AbuseReportGetResponseTypeDmca AbuseReportGetResponseType = "DMCA"` - `const AbuseReportGetResponseTypeEmer AbuseReportGetResponseType = "EMER"` - `const AbuseReportGetResponseTypeTm AbuseReportGetResponseType = "TM"` - `const AbuseReportGetResponseTypeRegWho AbuseReportGetResponseType = "REG_WHO"` - `const AbuseReportGetResponseTypeNcsei AbuseReportGetResponseType = "NCSEI"` - `const AbuseReportGetResponseTypeNetwork AbuseReportGetResponseType = "NETWORK"` - `Justification string` Justification for the report. - `OriginalWork string` Original work / Targeted brand in the alleged abuse. - `Submitter AbuseReportGetResponseSubmitter` Information about the submitter of the report. - `Company string` - `Email string` - `Name string` - `Telephone string` - `URLs []string` ### 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.Get( context.TODO(), "report_param", abuse_reports.AbuseReportGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", abuseReport.ID) } ``` #### Response ```json { "result": { "id": "id", "cdate": "2009-11-10T23:00:00Z", "domain": "domain", "mitigation_summary": { "accepted_url_count": 0, "active_count": 0, "external_host_notified": true, "in_review_count": 0, "pending_count": 0 }, "status": "accepted", "type": "PHISH", "justification": "justification", "original_work": "original_work", "submitter": { "company": "company", "email": "email", "name": "name", "telephone": "telephone" }, "urls": [ "string" ] }, "success": true, "errors": [ { "message": "message", "code": "string" } ], "messages": [ { "message": "message" } ] } ``` ## List abuse reports `client.AbuseReports.List(ctx, params) (*V4PagePagination[AbuseReportListResponse], error)` **get** `/accounts/{account_id}/abuse-reports` List the abuse reports for a given account ### Parameters - `params AbuseReportListParams` - `AccountID param.Field[string]` Path param: Cloudflare Account ID - `CreatedAfter param.Field[string]` Query param: Returns reports created after the specified date - `CreatedBefore param.Field[string]` Query param: Returns reports created before the specified date - `Domain param.Field[string]` Query param: Filter by domain name related to the abuse report - `MitigationStatus param.Field[AbuseReportListParamsMitigationStatus]` Query param: Filter reports that have any mitigations in the given status. - `const AbuseReportListParamsMitigationStatusPending AbuseReportListParamsMitigationStatus = "pending"` - `const AbuseReportListParamsMitigationStatusActive AbuseReportListParamsMitigationStatus = "active"` - `const AbuseReportListParamsMitigationStatusInReview AbuseReportListParamsMitigationStatus = "in_review"` - `const AbuseReportListParamsMitigationStatusCancelled AbuseReportListParamsMitigationStatus = "cancelled"` - `const AbuseReportListParamsMitigationStatusRemoved AbuseReportListParamsMitigationStatus = "removed"` - `Page param.Field[int64]` Query param: Where in pagination to start listing abuse reports - `PerPage param.Field[int64]` Query param: How many abuse reports per page to list - `Sort param.Field[string]` Query param: A property to sort by, followed by the order (id, cdate, domain, type, status) - `Status param.Field[AbuseReportListParamsStatus]` Query param: Filter by the status of the report. - `const AbuseReportListParamsStatusAccepted AbuseReportListParamsStatus = "accepted"` - `const AbuseReportListParamsStatusInReview AbuseReportListParamsStatus = "in_review"` - `Type param.Field[AbuseReportListParamsType]` Query param: Filter by the type of the report. - `const AbuseReportListParamsTypePhish AbuseReportListParamsType = "PHISH"` - `const AbuseReportListParamsTypeGen AbuseReportListParamsType = "GEN"` - `const AbuseReportListParamsTypeThreat AbuseReportListParamsType = "THREAT"` - `const AbuseReportListParamsTypeDmca AbuseReportListParamsType = "DMCA"` - `const AbuseReportListParamsTypeEmer AbuseReportListParamsType = "EMER"` - `const AbuseReportListParamsTypeTm AbuseReportListParamsType = "TM"` - `const AbuseReportListParamsTypeRegWho AbuseReportListParamsType = "REG_WHO"` - `const AbuseReportListParamsTypeNcsei AbuseReportListParamsType = "NCSEI"` - `const AbuseReportListParamsTypeNetwork AbuseReportListParamsType = "NETWORK"` ### Returns - `type AbuseReportListResponse struct{…}` - `Reports []AbuseReportListResponseReport` - `ID string` Public facing ID of abuse report, aka abuse_rand. - `Cdate string` Creation date of report. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `Domain string` Domain that relates to the report. - `MitigationSummary AbuseReportListResponseReportsMitigationSummary` A summary of the mitigations related to this report. - `AcceptedURLCount int64` How many of the reported URLs were confirmed as abusive. - `ActiveCount int64` How many mitigations are active. - `ExternalHostNotified bool` Whether the report has been forwarded to an external hosting provider. - `InReviewCount int64` How many mitigations are under review. - `PendingCount int64` How many mitigations are pending their effective date. - `Status AbuseReportListResponseReportsStatus` An enum value that represents the status of an abuse record - `const AbuseReportListResponseReportsStatusAccepted AbuseReportListResponseReportsStatus = "accepted"` - `const AbuseReportListResponseReportsStatusInReview AbuseReportListResponseReportsStatus = "in_review"` - `Type AbuseReportListResponseReportsType` The abuse report type - `const AbuseReportListResponseReportsTypePhish AbuseReportListResponseReportsType = "PHISH"` - `const AbuseReportListResponseReportsTypeGen AbuseReportListResponseReportsType = "GEN"` - `const AbuseReportListResponseReportsTypeThreat AbuseReportListResponseReportsType = "THREAT"` - `const AbuseReportListResponseReportsTypeDmca AbuseReportListResponseReportsType = "DMCA"` - `const AbuseReportListResponseReportsTypeEmer AbuseReportListResponseReportsType = "EMER"` - `const AbuseReportListResponseReportsTypeTm AbuseReportListResponseReportsType = "TM"` - `const AbuseReportListResponseReportsTypeRegWho AbuseReportListResponseReportsType = "REG_WHO"` - `const AbuseReportListResponseReportsTypeNcsei AbuseReportListResponseReportsType = "NCSEI"` - `const AbuseReportListResponseReportsTypeNetwork AbuseReportListResponseReportsType = "NETWORK"` - `Justification string` Justification for the report. - `OriginalWork string` Original work / Targeted brand in the alleged abuse. - `Submitter AbuseReportListResponseReportsSubmitter` Information about the submitter of the report. - `Company string` - `Email string` - `Name string` - `Telephone string` - `URLs []string` ### 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"), ) page, err := client.AbuseReports.List(context.TODO(), abuse_reports.AbuseReportListParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "success": true, "errors": [ { "message": "message" } ], "messages": [ { "message": "message" } ], "result": { "reports": [ { "id": "id", "cdate": "2009-11-10T23:00:00Z", "domain": "domain", "mitigation_summary": { "accepted_url_count": 0, "active_count": 0, "external_host_notified": true, "in_review_count": 0, "pending_count": 0 }, "status": "accepted", "type": "PHISH", "justification": "justification", "original_work": "original_work", "submitter": { "company": "company", "email": "email", "name": "name", "telephone": "telephone" }, "urls": [ "string" ] } ] }, "result_info": { "count": 0, "page": 0, "per_page": 0, "total_count": 0, "total_pages": 0 } } ``` # Mitigations ## List abuse report mitigations `client.AbuseReports.Mitigations.List(ctx, reportID, params) (*V4PagePagination[MitigationListResponse], error)` **get** `/accounts/{account_id}/abuse-reports/{report_id}/mitigations` List mitigations done to remediate the abuse report. ### Parameters - `reportID string` - `params MitigationListParams` - `AccountID param.Field[string]` Path param: Cloudflare Account ID - `EffectiveAfter param.Field[string]` Query param: Returns mitigation that were dispatched after the given date - `EffectiveBefore param.Field[string]` Query param: Returns mitigations that were dispatched before the given date - `EntityType param.Field[MitigationListParamsEntityType]` Query param: Filter by the type of entity the mitigation impacts. - `const MitigationListParamsEntityTypeURLPattern MitigationListParamsEntityType = "url_pattern"` - `const MitigationListParamsEntityTypeAccount MitigationListParamsEntityType = "account"` - `const MitigationListParamsEntityTypeZone MitigationListParamsEntityType = "zone"` - `Page param.Field[int64]` Query param: Where in pagination to start listing abuse reports - `PerPage param.Field[int64]` Query param: How many abuse reports per page to list - `Sort param.Field[MitigationListParamsSort]` Query param: A property to sort by, followed by the order - `const MitigationListParamsSortTypeAsc MitigationListParamsSort = "type,asc"` - `const MitigationListParamsSortTypeDesc MitigationListParamsSort = "type,desc"` - `const MitigationListParamsSortEffectiveDateAsc MitigationListParamsSort = "effective_date,asc"` - `const MitigationListParamsSortEffectiveDateDesc MitigationListParamsSort = "effective_date,desc"` - `const MitigationListParamsSortStatusAsc MitigationListParamsSort = "status,asc"` - `const MitigationListParamsSortStatusDesc MitigationListParamsSort = "status,desc"` - `const MitigationListParamsSortEntityTypeAsc MitigationListParamsSort = "entity_type,asc"` - `const MitigationListParamsSortEntityTypeDesc MitigationListParamsSort = "entity_type,desc"` - `Status param.Field[MitigationListParamsStatus]` Query param: Filter by the status of the mitigation. - `const MitigationListParamsStatusPending MitigationListParamsStatus = "pending"` - `const MitigationListParamsStatusActive MitigationListParamsStatus = "active"` - `const MitigationListParamsStatusInReview MitigationListParamsStatus = "in_review"` - `const MitigationListParamsStatusCancelled MitigationListParamsStatus = "cancelled"` - `const MitigationListParamsStatusRemoved MitigationListParamsStatus = "removed"` - `Type param.Field[MitigationListParamsType]` Query param: Filter by the type of mitigation. This filter parameter can be specified multiple times to include multiple types of mitigations in the result set, e.g. ?type=rate_limit_cache&type=legal_block. - `const MitigationListParamsTypeAccountSuspend MitigationListParamsType = "account_suspend"` - `const MitigationListParamsTypeCopyrightInterstitial MitigationListParamsType = "copyright_interstitial"` - `const MitigationListParamsTypeGeoBlock MitigationListParamsType = "geo_block"` - `const MitigationListParamsTypeLegalBlock MitigationListParamsType = "legal_block"` - `const MitigationListParamsTypeMalwareInterstitial MitigationListParamsType = "malware_interstitial"` - `const MitigationListParamsTypeMisleadingInterstitial MitigationListParamsType = "misleading_interstitial"` - `const MitigationListParamsTypeNetworkBlock MitigationListParamsType = "network_block"` - `const MitigationListParamsTypePhishingInterstitial MitigationListParamsType = "phishing_interstitial"` - `const MitigationListParamsTypePlayfairiteEnforce MitigationListParamsType = "playfairite_enforce"` - `const MitigationListParamsTypeR2TakedownAccount MitigationListParamsType = "r2_takedown_account"` - `const MitigationListParamsTypeR2TakedownBucket MitigationListParamsType = "r2_takedown_bucket"` - `const MitigationListParamsTypeR2TakedownObject MitigationListParamsType = "r2_takedown_object"` - `const MitigationListParamsTypeRateLimitCache MitigationListParamsType = "rate_limit_cache"` - `const MitigationListParamsTypeRedirectVideoStream MitigationListParamsType = "redirect_video_stream"` - `const MitigationListParamsTypeZoneFint MitigationListParamsType = "zone_fint"` - `const MitigationListParamsTypeRegistrarFreeze MitigationListParamsType = "registrar_freeze"` - `const MitigationListParamsTypeRegistrarParking MitigationListParamsType = "registrar_parking"` - `const MitigationListParamsTypeStreamBlockAccount MitigationListParamsType = "stream_block_account"` - `const MitigationListParamsTypeUserSuspend MitigationListParamsType = "user_suspend"` - `const MitigationListParamsTypeWorkersTakedownByZoneID MitigationListParamsType = "workers_takedown_by_zone_id"` ### Returns - `type MitigationListResponse struct{…}` - `Mitigations []MitigationListResponseMitigation` - `ID string` ID of remediation. - `EffectiveDate string` Date when the mitigation will become active. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `EntityID string` - `EntityType MitigationListResponseMitigationsEntityType` The type of entity targeted by a mitigation. - `const MitigationListResponseMitigationsEntityTypeURLPattern MitigationListResponseMitigationsEntityType = "url_pattern"` - `const MitigationListResponseMitigationsEntityTypeAccount MitigationListResponseMitigationsEntityType = "account"` - `const MitigationListResponseMitigationsEntityTypeZone MitigationListResponseMitigationsEntityType = "zone"` - `Status MitigationListResponseMitigationsStatus` The status of a mitigation - `const MitigationListResponseMitigationsStatusPending MitigationListResponseMitigationsStatus = "pending"` - `const MitigationListResponseMitigationsStatusActive MitigationListResponseMitigationsStatus = "active"` - `const MitigationListResponseMitigationsStatusInReview MitigationListResponseMitigationsStatus = "in_review"` - `const MitigationListResponseMitigationsStatusCancelled MitigationListResponseMitigationsStatus = "cancelled"` - `const MitigationListResponseMitigationsStatusRemoved MitigationListResponseMitigationsStatus = "removed"` - `Type MitigationListResponseMitigationsType` The type of mitigation applied to a reported entity. - `const MitigationListResponseMitigationsTypeAccountSuspend MitigationListResponseMitigationsType = "account_suspend"` - `const MitigationListResponseMitigationsTypeCopyrightInterstitial MitigationListResponseMitigationsType = "copyright_interstitial"` - `const MitigationListResponseMitigationsTypeGeoBlock MitigationListResponseMitigationsType = "geo_block"` - `const MitigationListResponseMitigationsTypeLegalBlock MitigationListResponseMitigationsType = "legal_block"` - `const MitigationListResponseMitigationsTypeMalwareInterstitial MitigationListResponseMitigationsType = "malware_interstitial"` - `const MitigationListResponseMitigationsTypeMisleadingInterstitial MitigationListResponseMitigationsType = "misleading_interstitial"` - `const MitigationListResponseMitigationsTypeNetworkBlock MitigationListResponseMitigationsType = "network_block"` - `const MitigationListResponseMitigationsTypePhishingInterstitial MitigationListResponseMitigationsType = "phishing_interstitial"` - `const MitigationListResponseMitigationsTypePlayfairiteEnforce MitigationListResponseMitigationsType = "playfairite_enforce"` - `const MitigationListResponseMitigationsTypeR2TakedownAccount MitigationListResponseMitigationsType = "r2_takedown_account"` - `const MitigationListResponseMitigationsTypeR2TakedownBucket MitigationListResponseMitigationsType = "r2_takedown_bucket"` - `const MitigationListResponseMitigationsTypeR2TakedownObject MitigationListResponseMitigationsType = "r2_takedown_object"` - `const MitigationListResponseMitigationsTypeRateLimitCache MitigationListResponseMitigationsType = "rate_limit_cache"` - `const MitigationListResponseMitigationsTypeRedirectVideoStream MitigationListResponseMitigationsType = "redirect_video_stream"` - `const MitigationListResponseMitigationsTypeZoneFint MitigationListResponseMitigationsType = "zone_fint"` - `const MitigationListResponseMitigationsTypeRegistrarFreeze MitigationListResponseMitigationsType = "registrar_freeze"` - `const MitigationListResponseMitigationsTypeRegistrarParking MitigationListResponseMitigationsType = "registrar_parking"` - `const MitigationListResponseMitigationsTypeStreamBlockAccount MitigationListResponseMitigationsType = "stream_block_account"` - `const MitigationListResponseMitigationsTypeUserSuspend MitigationListResponseMitigationsType = "user_suspend"` - `const MitigationListResponseMitigationsTypeWorkersTakedownByZoneID MitigationListResponseMitigationsType = "workers_takedown_by_zone_id"` ### 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"), ) page, err := client.AbuseReports.Mitigations.List( context.TODO(), "report_id", abuse_reports.MitigationListParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "success": true, "errors": [ { "message": "message" } ], "messages": [ { "message": "message" } ], "result": { "mitigations": [ { "id": "id", "effective_date": "2009-11-10T23:00:00Z", "entity_id": "entity_id", "entity_type": "url_pattern", "status": "pending", "type": "account_suspend" } ] }, "result_info": { "count": 0, "page": 0, "per_page": 0, "total_count": 0, "total_pages": 0 } } ``` ## Request review on mitigations `client.AbuseReports.Mitigations.Review(ctx, reportID, params) (*SinglePage[MitigationReviewResponse], error)` **post** `/accounts/{account_id}/abuse-reports/{report_id}/mitigations/appeal` Request a review for mitigations on an account. ### Parameters - `reportID string` - `params MitigationReviewParams` - `AccountID param.Field[string]` Path param: Cloudflare Account ID - `Appeals param.Field[[]MitigationReviewParamsAppeal]` Body param: List of mitigations to appeal. - `ID string` ID of the mitigation to appeal. - `Reason MitigationReviewParamsAppealsReason` Reason why the customer is appealing. - `const MitigationReviewParamsAppealsReasonRemoved MitigationReviewParamsAppealsReason = "removed"` - `const MitigationReviewParamsAppealsReasonMisclassified MitigationReviewParamsAppealsReason = "misclassified"` - `Data param.Field[MitigationReviewParamsData]` Body param: Counter-notice details supporting an appeal. - `City string` - `Country string` - `Email string` - `FullName string` - `JurisdictionConsent bool` - `PerjuryAttestation bool` - `PhoneNumber string` - `Signature string` - `State string` - `StreetAddress string` - `URLs []string` - `ZipCode string` - `Company string` - `CounterNoticeResponse string` - `Type param.Field[MitigationReviewParamsType]` Body param: The type of appeal being submitted. - `const MitigationReviewParamsTypeCounterNotice MitigationReviewParamsType = "counter_notice"` - `const MitigationReviewParamsTypeContentRemoved MitigationReviewParamsType = "content_removed"` ### Returns - `type MitigationReviewResponse struct{…}` - `ID string` ID of remediation. - `EffectiveDate string` Date when the mitigation will become active. Time in RFC 3339 format (https://www.rfc-editor.org/rfc/rfc3339.html) - `EntityID string` - `EntityType MitigationReviewResponseEntityType` The type of entity targeted by a mitigation. - `const MitigationReviewResponseEntityTypeURLPattern MitigationReviewResponseEntityType = "url_pattern"` - `const MitigationReviewResponseEntityTypeAccount MitigationReviewResponseEntityType = "account"` - `const MitigationReviewResponseEntityTypeZone MitigationReviewResponseEntityType = "zone"` - `Status MitigationReviewResponseStatus` The status of a mitigation - `const MitigationReviewResponseStatusPending MitigationReviewResponseStatus = "pending"` - `const MitigationReviewResponseStatusActive MitigationReviewResponseStatus = "active"` - `const MitigationReviewResponseStatusInReview MitigationReviewResponseStatus = "in_review"` - `const MitigationReviewResponseStatusCancelled MitigationReviewResponseStatus = "cancelled"` - `const MitigationReviewResponseStatusRemoved MitigationReviewResponseStatus = "removed"` - `Type MitigationReviewResponseType` The type of mitigation applied to a reported entity. - `const MitigationReviewResponseTypeAccountSuspend MitigationReviewResponseType = "account_suspend"` - `const MitigationReviewResponseTypeCopyrightInterstitial MitigationReviewResponseType = "copyright_interstitial"` - `const MitigationReviewResponseTypeGeoBlock MitigationReviewResponseType = "geo_block"` - `const MitigationReviewResponseTypeLegalBlock MitigationReviewResponseType = "legal_block"` - `const MitigationReviewResponseTypeMalwareInterstitial MitigationReviewResponseType = "malware_interstitial"` - `const MitigationReviewResponseTypeMisleadingInterstitial MitigationReviewResponseType = "misleading_interstitial"` - `const MitigationReviewResponseTypeNetworkBlock MitigationReviewResponseType = "network_block"` - `const MitigationReviewResponseTypePhishingInterstitial MitigationReviewResponseType = "phishing_interstitial"` - `const MitigationReviewResponseTypePlayfairiteEnforce MitigationReviewResponseType = "playfairite_enforce"` - `const MitigationReviewResponseTypeR2TakedownAccount MitigationReviewResponseType = "r2_takedown_account"` - `const MitigationReviewResponseTypeR2TakedownBucket MitigationReviewResponseType = "r2_takedown_bucket"` - `const MitigationReviewResponseTypeR2TakedownObject MitigationReviewResponseType = "r2_takedown_object"` - `const MitigationReviewResponseTypeRateLimitCache MitigationReviewResponseType = "rate_limit_cache"` - `const MitigationReviewResponseTypeRedirectVideoStream MitigationReviewResponseType = "redirect_video_stream"` - `const MitigationReviewResponseTypeZoneFint MitigationReviewResponseType = "zone_fint"` - `const MitigationReviewResponseTypeRegistrarFreeze MitigationReviewResponseType = "registrar_freeze"` - `const MitigationReviewResponseTypeRegistrarParking MitigationReviewResponseType = "registrar_parking"` - `const MitigationReviewResponseTypeStreamBlockAccount MitigationReviewResponseType = "stream_block_account"` - `const MitigationReviewResponseTypeUserSuspend MitigationReviewResponseType = "user_suspend"` - `const MitigationReviewResponseTypeWorkersTakedownByZoneID MitigationReviewResponseType = "workers_takedown_by_zone_id"` ### 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"), ) page, err := client.AbuseReports.Mitigations.Review( context.TODO(), "report_id", abuse_reports.MitigationReviewParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "result_info": { "count": 0, "page": 0, "per_page": 0, "total_count": 0, "total_pages": 0 }, "success": true, "errors": [ { "message": "message" } ], "messages": [ { "message": "message" } ], "result": [ { "id": "id", "effective_date": "2009-11-10T23:00:00Z", "entity_id": "entity_id", "entity_type": "url_pattern", "status": "pending", "type": "account_suspend" } ] } ```