Bot Management

bot_management

Methods

get/zones/{zone_id}/bot_management

Retrieve a zone's Bot Management Config

put/zones/{zone_id}/bot_management

Updates the Bot Management configuration for a zone.

This API is used to update:

  • Bot Fight Mode
  • Super Bot Fight Mode
  • Bot Management for Enterprise

See Bot Plans for more information on the different plans
If you recently upgraded or downgraded your plan, refer to the following examples to clean up old configurations. Copy and paste the example body to remove old zone configurations based on your current plan.

Clean up configuration for Bot Fight Mode plan

{
  "sbfm_likely_automated": "allow", 
  "sbfm_definitely_automated": "allow", 
  "sbfm_verified_bots": "allow", 
  "sbfm_static_resource_protection": false, 
  "optimize_wordpress": false, 
  "suppress_session_score": false 
}

Clean up configuration for SBFM Pro plan

{
  "sbfm_likely_automated": "allow", 
  "fight_mode": false 
}

Clean up configuration for SBFM Biz plan

{
  "fight_mode": false
}

Clean up configuration for BM Enterprise Subscription plan

It is strongly recommended that you ensure you have custom rules in place to protect your zone before disabling the SBFM rules. Without these protections, your zone is vulnerable to attacks.

{
  "sbfm_likely_automated": "allow", 
  "sbfm_definitely_automated": "allow", 
  "sbfm_verified_bots": "allow", 
  "sbfm_static_resource_protection": false, 
  "optimize_wordpress": false, 
  "fight_mode": false
}
Security

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

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Parameters
zone_id: string

Identifier

Response fields
errors: Array<>
messages: Array<>
success: true

Whether the API call was successful

Request example
200Example

Domain types

BotFightModeConfiguration = { ai_bots_protection, enable_js, fight_mode, 2 more... }
SubscriptionConfiguration = { ai_bots_protection, auto_update_model, enable_js, 3 more... }
SuperBotFightModeDefinitelyConfiguration = { ai_bots_protection, enable_js, optimize_wordpress, 5 more... }
SuperBotFightModeLikelyConfiguration = { ai_bots_protection, enable_js, optimize_wordpress, 6 more... }