Skip to content
Start here

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.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Trust and Safety Write
ParametersExpand Collapse
reportID string
params MitigationReviewParams
AccountID param.Field[string]

Path param: Cloudflare Account ID

maxLength32
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.

One of the following:
const MitigationReviewParamsAppealsReasonRemoved MitigationReviewParamsAppealsReason = "removed"
const MitigationReviewParamsAppealsReasonMisclassified MitigationReviewParamsAppealsReason = "misclassified"
ReturnsExpand Collapse
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.

One of the following:
const MitigationReviewResponseEntityTypeURLPattern MitigationReviewResponseEntityType = "url_pattern"
const MitigationReviewResponseEntityTypeAccount MitigationReviewResponseEntityType = "account"
const MitigationReviewResponseEntityTypeZone MitigationReviewResponseEntityType = "zone"
Status MitigationReviewResponseStatus

The status of a mitigation

One of the following:
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.

One of the following:
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 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"

Request review on mitigations

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/abuse_reports"
  "github.com/stainless-sdks/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"),
      Appeals: cloudflare.F([]abuse_reports.MitigationReviewParamsAppeal{abuse_reports.MitigationReviewParamsAppeal{
        ID: cloudflare.F("id"),
        Reason: cloudflare.F(abuse_reports.MitigationReviewParamsAppealsReasonMisclassified),
      }}),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "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"
    }
  ]
}
Returns Examples
{
  "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"
    }
  ]
}