Global enable Bot Fight Mode?

Is there a way for me to quickly enable this on all sites in the GUI? API…anyone got a script?

You’d have to send individual requests for each domain, however a PUT request to https://api.cloudflare.com/client/v4/zones/ZONEID/bot_management should do the trick

Make sure to insert the appropriate zone id, authentication email, and authentication key.

curl -X PUT "https://api.cloudflare.com/client/v4/zones/ZONEID/bot_management" \
     -H "X-Auth-Email: AUTHEMAIL" \
     -H "X-Auth-Key: AUTHKEY" \
     -H "Content-Type: application/json" \
     --data '{"fight_mode":true}'

Simply run this in a loop for all your zone ids and you should be good to go.

Also, that call hasnt been officially announced yet, so it might change at any time.

3 Likes

Cool. I will play with that. Thanks

1 Like