PHP Client for Cloudflare API
Client Reference

Bot Management

Bot Management endpoint reference.

Get

Get the current Bot Management configuration for a zone.

ParamTypeRequiredDefaultDescription
zoneIdstringYesZone Identifier.
php
$response = $client->botManagement()->get('ZONE_ID');
View this operation on the Cloudflare API Reference

Update

Update the Bot Management configuration for a zone.

ParamTypeRequiredDefaultDescription
zoneIdstringYesZone Identifier.
valuesarrayYesValues to set on the Bot Management config, e.g. `fight_mode`, `enable_js`, `sbfm_definitely_automated`.
php
$response = $client->botManagement()->update('ZONE_ID', []);
View this operation on the Cloudflare API Reference
Copyright © 2026