Is there a way to toggle the Bot Fight Mode via the API?

I would like to know if I can toggle the Bot Fight Mode via the API, I tried searching for that but I couldn’t easily find it in the docs.

This is undocumented, and may change.

Replace the variables as needed.

curl -X PUT --header "X-Auth-Email: ${auth_email}" --header 'Content-Type: application/json' --header "X-Auth-Key: ${auth_key}" https://api.cloudflare.com/client/v4/zones/${zoneid}/bot_management --data '{"fight_mode":false}'

1 Like

I tried creating an API key for the bot management in my zone, but I get the following error:

Failed common permission check against resources. (Permission group: “Bot Management Write”) (Code: 1001)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.