Skip to content
Start here

Get Zone Bot Management Config

client.BotManagement.Get(ctx, query) (*BotManagementGetResponse, error)
GET/zones/{zone_id}/bot_management

Retrieve a zone’s Bot Management Config

Security
API Token

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

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Bot Management WriteBot Management Read
ParametersExpand Collapse
query BotManagementGetParams
ZoneID param.Field[string]

Identifier.

maxLength32
ReturnsExpand Collapse
type BotManagementGetResponse interface{…}
One of the following:
type BotFightModeConfiguration struct{…}
AIAgents BotFightModeConfigurationAIAgentsOptional

Configure blocking behavior for supported personal AI agents.

AnthropicAgent BotFightModeConfigurationAIAgentsAnthropicAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const BotFightModeConfigurationAIAgentsAnthropicAgentDisabled BotFightModeConfigurationAIAgentsAnthropicAgent = "disabled"
const BotFightModeConfigurationAIAgentsAnthropicAgentBlock BotFightModeConfigurationAIAgentsAnthropicAgent = "block"
const BotFightModeConfigurationAIAgentsAnthropicAgentOnlyOnADPages BotFightModeConfigurationAIAgentsAnthropicAgent = "only_on_ad_pages"
GoogleAgent BotFightModeConfigurationAIAgentsGoogleAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const BotFightModeConfigurationAIAgentsGoogleAgentDisabled BotFightModeConfigurationAIAgentsGoogleAgent = "disabled"
const BotFightModeConfigurationAIAgentsGoogleAgentBlock BotFightModeConfigurationAIAgentsGoogleAgent = "block"
const BotFightModeConfigurationAIAgentsGoogleAgentOnlyOnADPages BotFightModeConfigurationAIAgentsGoogleAgent = "only_on_ad_pages"
Instinct BotFightModeConfigurationAIAgentsInstinctOptional

Action to apply to one supported personal AI agent.

One of the following:
const BotFightModeConfigurationAIAgentsInstinctDisabled BotFightModeConfigurationAIAgentsInstinct = "disabled"
const BotFightModeConfigurationAIAgentsInstinctBlock BotFightModeConfigurationAIAgentsInstinct = "block"
const BotFightModeConfigurationAIAgentsInstinctOnlyOnADPages BotFightModeConfigurationAIAgentsInstinct = "only_on_ad_pages"
Muse BotFightModeConfigurationAIAgentsMuseOptional

Action to apply to one supported personal AI agent.

One of the following:
const BotFightModeConfigurationAIAgentsMuseDisabled BotFightModeConfigurationAIAgentsMuse = "disabled"
const BotFightModeConfigurationAIAgentsMuseBlock BotFightModeConfigurationAIAgentsMuse = "block"
const BotFightModeConfigurationAIAgentsMuseOnlyOnADPages BotFightModeConfigurationAIAgentsMuse = "only_on_ad_pages"
OpenAIAgent BotFightModeConfigurationAIAgentsOpenAIAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const BotFightModeConfigurationAIAgentsOpenAIAgentDisabled BotFightModeConfigurationAIAgentsOpenAIAgent = "disabled"
const BotFightModeConfigurationAIAgentsOpenAIAgentBlock BotFightModeConfigurationAIAgentsOpenAIAgent = "block"
const BotFightModeConfigurationAIAgentsOpenAIAgentOnlyOnADPages BotFightModeConfigurationAIAgentsOpenAIAgent = "only_on_ad_pages"
AIBotsMigrationOptOut boolOptional

Temporary migration flag tracking zones opted out of AI bots managed-rule updates.

AIBotsProtection BotFightModeConfigurationAIBotsProtectionOptional

Enable rule to block AI Scrapers and Crawlers.

One of the following:
const BotFightModeConfigurationAIBotsProtectionBlock BotFightModeConfigurationAIBotsProtection = "block"
const BotFightModeConfigurationAIBotsProtectionDisabled BotFightModeConfigurationAIBotsProtection = "disabled"
const BotFightModeConfigurationAIBotsProtectionOnlyOnADPages BotFightModeConfigurationAIBotsProtection = "only_on_ad_pages"
One of the following:
AITraining BotFightModeConfigurationAITrainingOptional

Configure robots.txt policy for AI model training bots.

One of the following:
const BotFightModeConfigurationAITrainingDisabled BotFightModeConfigurationAITraining = "disabled"
const BotFightModeConfigurationAITrainingDisallow BotFightModeConfigurationAITraining = "disallow"
const BotFightModeConfigurationAITrainingBlock BotFightModeConfigurationAITraining = "block"
const BotFightModeConfigurationAITrainingOnlyOnADPages BotFightModeConfigurationAITraining = "only_on_ad_pages"
AIUser BotFightModeConfigurationAIUserOptional

Configure robots.txt policy for AI assistant and agent bots.

One of the following:
const BotFightModeConfigurationAIUserDisabled BotFightModeConfigurationAIUser = "disabled"
const BotFightModeConfigurationAIUserBlock BotFightModeConfigurationAIUser = "block"
const BotFightModeConfigurationAIUserOnlyOnADPages BotFightModeConfigurationAIUser = "only_on_ad_pages"
BotPreferenceSyncEnabled boolOptional

Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone’s AI Search, AI User, and AI Training preferences.

CfRobotsVariant BotFightModeConfigurationCfRobotsVariantOptional

Specifies the Robots Access Control License variant to use.

One of the following:
const BotFightModeConfigurationCfRobotsVariantOff BotFightModeConfigurationCfRobotsVariant = "off"
const BotFightModeConfigurationCfRobotsVariantPolicyOnly BotFightModeConfigurationCfRobotsVariant = "policy_only"
ContentBotsProtection BotFightModeConfigurationContentBotsProtectionOptional

Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules.

One of the following:
const BotFightModeConfigurationContentBotsProtectionBlock BotFightModeConfigurationContentBotsProtection = "block"
const BotFightModeConfigurationContentBotsProtectionDisabled BotFightModeConfigurationContentBotsProtection = "disabled"
CrawlerProtection BotFightModeConfigurationCrawlerProtectionOptional

Enable rule to punish AI Scrapers and Crawlers via a link maze.

One of the following:
const BotFightModeConfigurationCrawlerProtectionEnabled BotFightModeConfigurationCrawlerProtection = "enabled"
const BotFightModeConfigurationCrawlerProtectionDisabled BotFightModeConfigurationCrawlerProtection = "disabled"
EnableJS boolOptional

Use lightweight, invisible JavaScript detections to improve Bot Management. Learn more about JavaScript Detections.

FightMode boolOptional

Whether to enable Bot Fight Mode.

IsRobotsTXTManaged boolOptional

Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt.

JsdAPIResultsEnabled boolOptional

Whether to use JavaScript Detection results submitted through the API for this zone.

StaleZoneConfiguration BotFightModeConfigurationStaleZoneConfigurationOptional

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

OptimizeWordpress boolOptional

Indicates that the zone’s wordpress optimization for SBFM is turned on.

SBFMDefinitelyAutomated stringOptional

Indicates that the zone’s definitely automated requests are being blocked or challenged.

SBFMLikelyAutomated stringOptional

Indicates that the zone’s likely automated requests are being blocked or challenged.

SBFMStaticResourceProtection stringOptional

Indicates that the zone’s static resource protection is turned on.

SBFMVerifiedBots stringOptional

Indicates that the zone’s verified bot requests are being blocked.

SuppressSessionScore boolOptional

Indicates that the zone’s session score tracking is disabled.

UsingLatestModel boolOptional

A read-only field that indicates whether the zone currently is running the latest ML model.

type SuperBotFightModeDefinitelyConfiguration struct{…}
AIAgents SuperBotFightModeDefinitelyConfigurationAIAgentsOptional

Configure blocking behavior for supported personal AI agents.

AnthropicAgent SuperBotFightModeDefinitelyConfigurationAIAgentsAnthropicAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const SuperBotFightModeDefinitelyConfigurationAIAgentsAnthropicAgentDisabled SuperBotFightModeDefinitelyConfigurationAIAgentsAnthropicAgent = "disabled"
const SuperBotFightModeDefinitelyConfigurationAIAgentsAnthropicAgentBlock SuperBotFightModeDefinitelyConfigurationAIAgentsAnthropicAgent = "block"
const SuperBotFightModeDefinitelyConfigurationAIAgentsAnthropicAgentOnlyOnADPages SuperBotFightModeDefinitelyConfigurationAIAgentsAnthropicAgent = "only_on_ad_pages"
GoogleAgent SuperBotFightModeDefinitelyConfigurationAIAgentsGoogleAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const SuperBotFightModeDefinitelyConfigurationAIAgentsGoogleAgentDisabled SuperBotFightModeDefinitelyConfigurationAIAgentsGoogleAgent = "disabled"
const SuperBotFightModeDefinitelyConfigurationAIAgentsGoogleAgentBlock SuperBotFightModeDefinitelyConfigurationAIAgentsGoogleAgent = "block"
const SuperBotFightModeDefinitelyConfigurationAIAgentsGoogleAgentOnlyOnADPages SuperBotFightModeDefinitelyConfigurationAIAgentsGoogleAgent = "only_on_ad_pages"
Instinct SuperBotFightModeDefinitelyConfigurationAIAgentsInstinctOptional

Action to apply to one supported personal AI agent.

One of the following:
const SuperBotFightModeDefinitelyConfigurationAIAgentsInstinctDisabled SuperBotFightModeDefinitelyConfigurationAIAgentsInstinct = "disabled"
const SuperBotFightModeDefinitelyConfigurationAIAgentsInstinctBlock SuperBotFightModeDefinitelyConfigurationAIAgentsInstinct = "block"
const SuperBotFightModeDefinitelyConfigurationAIAgentsInstinctOnlyOnADPages SuperBotFightModeDefinitelyConfigurationAIAgentsInstinct = "only_on_ad_pages"
Muse SuperBotFightModeDefinitelyConfigurationAIAgentsMuseOptional

Action to apply to one supported personal AI agent.

One of the following:
const SuperBotFightModeDefinitelyConfigurationAIAgentsMuseDisabled SuperBotFightModeDefinitelyConfigurationAIAgentsMuse = "disabled"
const SuperBotFightModeDefinitelyConfigurationAIAgentsMuseBlock SuperBotFightModeDefinitelyConfigurationAIAgentsMuse = "block"
const SuperBotFightModeDefinitelyConfigurationAIAgentsMuseOnlyOnADPages SuperBotFightModeDefinitelyConfigurationAIAgentsMuse = "only_on_ad_pages"
OpenAIAgent SuperBotFightModeDefinitelyConfigurationAIAgentsOpenAIAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const SuperBotFightModeDefinitelyConfigurationAIAgentsOpenAIAgentDisabled SuperBotFightModeDefinitelyConfigurationAIAgentsOpenAIAgent = "disabled"
const SuperBotFightModeDefinitelyConfigurationAIAgentsOpenAIAgentBlock SuperBotFightModeDefinitelyConfigurationAIAgentsOpenAIAgent = "block"
const SuperBotFightModeDefinitelyConfigurationAIAgentsOpenAIAgentOnlyOnADPages SuperBotFightModeDefinitelyConfigurationAIAgentsOpenAIAgent = "only_on_ad_pages"
AIBotsMigrationOptOut boolOptional

Temporary migration flag tracking zones opted out of AI bots managed-rule updates.

AIBotsProtection SuperBotFightModeDefinitelyConfigurationAIBotsProtectionOptional

Enable rule to block AI Scrapers and Crawlers.

One of the following:
const SuperBotFightModeDefinitelyConfigurationAIBotsProtectionBlock SuperBotFightModeDefinitelyConfigurationAIBotsProtection = "block"
const SuperBotFightModeDefinitelyConfigurationAIBotsProtectionDisabled SuperBotFightModeDefinitelyConfigurationAIBotsProtection = "disabled"
const SuperBotFightModeDefinitelyConfigurationAIBotsProtectionOnlyOnADPages SuperBotFightModeDefinitelyConfigurationAIBotsProtection = "only_on_ad_pages"
One of the following:
AITraining SuperBotFightModeDefinitelyConfigurationAITrainingOptional

Configure robots.txt policy for AI model training bots.

One of the following:
const SuperBotFightModeDefinitelyConfigurationAITrainingDisabled SuperBotFightModeDefinitelyConfigurationAITraining = "disabled"
const SuperBotFightModeDefinitelyConfigurationAITrainingDisallow SuperBotFightModeDefinitelyConfigurationAITraining = "disallow"
const SuperBotFightModeDefinitelyConfigurationAITrainingBlock SuperBotFightModeDefinitelyConfigurationAITraining = "block"
const SuperBotFightModeDefinitelyConfigurationAITrainingOnlyOnADPages SuperBotFightModeDefinitelyConfigurationAITraining = "only_on_ad_pages"
AIUser SuperBotFightModeDefinitelyConfigurationAIUserOptional

Configure robots.txt policy for AI assistant and agent bots.

One of the following:
const SuperBotFightModeDefinitelyConfigurationAIUserDisabled SuperBotFightModeDefinitelyConfigurationAIUser = "disabled"
const SuperBotFightModeDefinitelyConfigurationAIUserBlock SuperBotFightModeDefinitelyConfigurationAIUser = "block"
const SuperBotFightModeDefinitelyConfigurationAIUserOnlyOnADPages SuperBotFightModeDefinitelyConfigurationAIUser = "only_on_ad_pages"
BotPreferenceSyncEnabled boolOptional

Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone’s AI Search, AI User, and AI Training preferences.

CfRobotsVariant SuperBotFightModeDefinitelyConfigurationCfRobotsVariantOptional

Specifies the Robots Access Control License variant to use.

One of the following:
const SuperBotFightModeDefinitelyConfigurationCfRobotsVariantOff SuperBotFightModeDefinitelyConfigurationCfRobotsVariant = "off"
const SuperBotFightModeDefinitelyConfigurationCfRobotsVariantPolicyOnly SuperBotFightModeDefinitelyConfigurationCfRobotsVariant = "policy_only"
ContentBotsProtection SuperBotFightModeDefinitelyConfigurationContentBotsProtectionOptional

Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules.

One of the following:
const SuperBotFightModeDefinitelyConfigurationContentBotsProtectionBlock SuperBotFightModeDefinitelyConfigurationContentBotsProtection = "block"
const SuperBotFightModeDefinitelyConfigurationContentBotsProtectionDisabled SuperBotFightModeDefinitelyConfigurationContentBotsProtection = "disabled"
CrawlerProtection SuperBotFightModeDefinitelyConfigurationCrawlerProtectionOptional

Enable rule to punish AI Scrapers and Crawlers via a link maze.

One of the following:
const SuperBotFightModeDefinitelyConfigurationCrawlerProtectionEnabled SuperBotFightModeDefinitelyConfigurationCrawlerProtection = "enabled"
const SuperBotFightModeDefinitelyConfigurationCrawlerProtectionDisabled SuperBotFightModeDefinitelyConfigurationCrawlerProtection = "disabled"
EnableJS boolOptional

Use lightweight, invisible JavaScript detections to improve Bot Management. Learn more about JavaScript Detections.

IsRobotsTXTManaged boolOptional

Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt.

JsdAPIResultsEnabled boolOptional

Whether to use JavaScript Detection results submitted through the API for this zone.

OptimizeWordpress boolOptional

Whether to optimize Super Bot Fight Mode protections for Wordpress.

SBFMDefinitelyAutomated SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomatedOptional

Super Bot Fight Mode (SBFM) action to take on definitely automated requests.

One of the following:
const SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomatedAllow SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomated = "allow"
const SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomatedBlock SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomated = "block"
const SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomatedManagedChallenge SuperBotFightModeDefinitelyConfigurationSBFMDefinitelyAutomated = "managed_challenge"
SBFMStaticResourceProtection boolOptional

Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if static resources on your application need bot protection. Note: Static resource protection can also result in legitimate traffic being blocked.

SBFMVerifiedBots SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBotsOptional

Super Bot Fight Mode (SBFM) action to take on verified bots requests.

One of the following:
const SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBotsAllow SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBots = "allow"
const SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBotsBlock SuperBotFightModeDefinitelyConfigurationSBFMVerifiedBots = "block"
StaleZoneConfiguration SuperBotFightModeDefinitelyConfigurationStaleZoneConfigurationOptional

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

FightMode boolOptional

Indicates that the zone’s Bot Fight Mode is turned on.

SBFMLikelyAutomated stringOptional

Indicates that the zone’s likely automated requests are being blocked or challenged.

UsingLatestModel boolOptional

A read-only field that indicates whether the zone currently is running the latest ML model.

type SuperBotFightModeLikelyConfiguration struct{…}
AIAgents SuperBotFightModeLikelyConfigurationAIAgentsOptional

Configure blocking behavior for supported personal AI agents.

AnthropicAgent SuperBotFightModeLikelyConfigurationAIAgentsAnthropicAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const SuperBotFightModeLikelyConfigurationAIAgentsAnthropicAgentDisabled SuperBotFightModeLikelyConfigurationAIAgentsAnthropicAgent = "disabled"
const SuperBotFightModeLikelyConfigurationAIAgentsAnthropicAgentBlock SuperBotFightModeLikelyConfigurationAIAgentsAnthropicAgent = "block"
const SuperBotFightModeLikelyConfigurationAIAgentsAnthropicAgentOnlyOnADPages SuperBotFightModeLikelyConfigurationAIAgentsAnthropicAgent = "only_on_ad_pages"
GoogleAgent SuperBotFightModeLikelyConfigurationAIAgentsGoogleAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const SuperBotFightModeLikelyConfigurationAIAgentsGoogleAgentDisabled SuperBotFightModeLikelyConfigurationAIAgentsGoogleAgent = "disabled"
const SuperBotFightModeLikelyConfigurationAIAgentsGoogleAgentBlock SuperBotFightModeLikelyConfigurationAIAgentsGoogleAgent = "block"
const SuperBotFightModeLikelyConfigurationAIAgentsGoogleAgentOnlyOnADPages SuperBotFightModeLikelyConfigurationAIAgentsGoogleAgent = "only_on_ad_pages"
Instinct SuperBotFightModeLikelyConfigurationAIAgentsInstinctOptional

Action to apply to one supported personal AI agent.

One of the following:
const SuperBotFightModeLikelyConfigurationAIAgentsInstinctDisabled SuperBotFightModeLikelyConfigurationAIAgentsInstinct = "disabled"
const SuperBotFightModeLikelyConfigurationAIAgentsInstinctBlock SuperBotFightModeLikelyConfigurationAIAgentsInstinct = "block"
const SuperBotFightModeLikelyConfigurationAIAgentsInstinctOnlyOnADPages SuperBotFightModeLikelyConfigurationAIAgentsInstinct = "only_on_ad_pages"
Muse SuperBotFightModeLikelyConfigurationAIAgentsMuseOptional

Action to apply to one supported personal AI agent.

One of the following:
const SuperBotFightModeLikelyConfigurationAIAgentsMuseDisabled SuperBotFightModeLikelyConfigurationAIAgentsMuse = "disabled"
const SuperBotFightModeLikelyConfigurationAIAgentsMuseBlock SuperBotFightModeLikelyConfigurationAIAgentsMuse = "block"
const SuperBotFightModeLikelyConfigurationAIAgentsMuseOnlyOnADPages SuperBotFightModeLikelyConfigurationAIAgentsMuse = "only_on_ad_pages"
OpenAIAgent SuperBotFightModeLikelyConfigurationAIAgentsOpenAIAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const SuperBotFightModeLikelyConfigurationAIAgentsOpenAIAgentDisabled SuperBotFightModeLikelyConfigurationAIAgentsOpenAIAgent = "disabled"
const SuperBotFightModeLikelyConfigurationAIAgentsOpenAIAgentBlock SuperBotFightModeLikelyConfigurationAIAgentsOpenAIAgent = "block"
const SuperBotFightModeLikelyConfigurationAIAgentsOpenAIAgentOnlyOnADPages SuperBotFightModeLikelyConfigurationAIAgentsOpenAIAgent = "only_on_ad_pages"
AIBotsMigrationOptOut boolOptional

Temporary migration flag tracking zones opted out of AI bots managed-rule updates.

AIBotsProtection SuperBotFightModeLikelyConfigurationAIBotsProtectionOptional

Enable rule to block AI Scrapers and Crawlers.

One of the following:
const SuperBotFightModeLikelyConfigurationAIBotsProtectionBlock SuperBotFightModeLikelyConfigurationAIBotsProtection = "block"
const SuperBotFightModeLikelyConfigurationAIBotsProtectionDisabled SuperBotFightModeLikelyConfigurationAIBotsProtection = "disabled"
const SuperBotFightModeLikelyConfigurationAIBotsProtectionOnlyOnADPages SuperBotFightModeLikelyConfigurationAIBotsProtection = "only_on_ad_pages"
One of the following:
AITraining SuperBotFightModeLikelyConfigurationAITrainingOptional

Configure robots.txt policy for AI model training bots.

One of the following:
const SuperBotFightModeLikelyConfigurationAITrainingDisabled SuperBotFightModeLikelyConfigurationAITraining = "disabled"
const SuperBotFightModeLikelyConfigurationAITrainingDisallow SuperBotFightModeLikelyConfigurationAITraining = "disallow"
const SuperBotFightModeLikelyConfigurationAITrainingBlock SuperBotFightModeLikelyConfigurationAITraining = "block"
const SuperBotFightModeLikelyConfigurationAITrainingOnlyOnADPages SuperBotFightModeLikelyConfigurationAITraining = "only_on_ad_pages"
AIUser SuperBotFightModeLikelyConfigurationAIUserOptional

Configure robots.txt policy for AI assistant and agent bots.

One of the following:
const SuperBotFightModeLikelyConfigurationAIUserDisabled SuperBotFightModeLikelyConfigurationAIUser = "disabled"
const SuperBotFightModeLikelyConfigurationAIUserBlock SuperBotFightModeLikelyConfigurationAIUser = "block"
const SuperBotFightModeLikelyConfigurationAIUserOnlyOnADPages SuperBotFightModeLikelyConfigurationAIUser = "only_on_ad_pages"
BotPreferenceSyncEnabled boolOptional

Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone’s AI Search, AI User, and AI Training preferences.

CfRobotsVariant SuperBotFightModeLikelyConfigurationCfRobotsVariantOptional

Specifies the Robots Access Control License variant to use.

One of the following:
const SuperBotFightModeLikelyConfigurationCfRobotsVariantOff SuperBotFightModeLikelyConfigurationCfRobotsVariant = "off"
const SuperBotFightModeLikelyConfigurationCfRobotsVariantPolicyOnly SuperBotFightModeLikelyConfigurationCfRobotsVariant = "policy_only"
ContentBotsProtection SuperBotFightModeLikelyConfigurationContentBotsProtectionOptional

Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules.

One of the following:
const SuperBotFightModeLikelyConfigurationContentBotsProtectionBlock SuperBotFightModeLikelyConfigurationContentBotsProtection = "block"
const SuperBotFightModeLikelyConfigurationContentBotsProtectionDisabled SuperBotFightModeLikelyConfigurationContentBotsProtection = "disabled"
CrawlerProtection SuperBotFightModeLikelyConfigurationCrawlerProtectionOptional

Enable rule to punish AI Scrapers and Crawlers via a link maze.

One of the following:
const SuperBotFightModeLikelyConfigurationCrawlerProtectionEnabled SuperBotFightModeLikelyConfigurationCrawlerProtection = "enabled"
const SuperBotFightModeLikelyConfigurationCrawlerProtectionDisabled SuperBotFightModeLikelyConfigurationCrawlerProtection = "disabled"
EnableJS boolOptional

Use lightweight, invisible JavaScript detections to improve Bot Management. Learn more about JavaScript Detections.

IsRobotsTXTManaged boolOptional

Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt.

JsdAPIResultsEnabled boolOptional

Whether to use JavaScript Detection results submitted through the API for this zone.

OptimizeWordpress boolOptional

Whether to optimize Super Bot Fight Mode protections for Wordpress.

SBFMDefinitelyAutomated SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomatedOptional

Super Bot Fight Mode (SBFM) action to take on definitely automated requests.

One of the following:
const SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomatedAllow SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomated = "allow"
const SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomatedBlock SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomated = "block"
const SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomatedManagedChallenge SuperBotFightModeLikelyConfigurationSBFMDefinitelyAutomated = "managed_challenge"
SBFMLikelyAutomated SuperBotFightModeLikelyConfigurationSBFMLikelyAutomatedOptional

Super Bot Fight Mode (SBFM) action to take on likely automated requests.

One of the following:
const SuperBotFightModeLikelyConfigurationSBFMLikelyAutomatedAllow SuperBotFightModeLikelyConfigurationSBFMLikelyAutomated = "allow"
const SuperBotFightModeLikelyConfigurationSBFMLikelyAutomatedBlock SuperBotFightModeLikelyConfigurationSBFMLikelyAutomated = "block"
const SuperBotFightModeLikelyConfigurationSBFMLikelyAutomatedManagedChallenge SuperBotFightModeLikelyConfigurationSBFMLikelyAutomated = "managed_challenge"
SBFMStaticResourceProtection boolOptional

Super Bot Fight Mode (SBFM) to enable static resource protection. Enable if static resources on your application need bot protection. Note: Static resource protection can also result in legitimate traffic being blocked.

SBFMVerifiedBots SuperBotFightModeLikelyConfigurationSBFMVerifiedBotsOptional

Super Bot Fight Mode (SBFM) action to take on verified bots requests.

One of the following:
const SuperBotFightModeLikelyConfigurationSBFMVerifiedBotsAllow SuperBotFightModeLikelyConfigurationSBFMVerifiedBots = "allow"
const SuperBotFightModeLikelyConfigurationSBFMVerifiedBotsBlock SuperBotFightModeLikelyConfigurationSBFMVerifiedBots = "block"
StaleZoneConfiguration SuperBotFightModeLikelyConfigurationStaleZoneConfigurationOptional

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

FightMode boolOptional

Indicates that the zone’s Bot Fight Mode is turned on.

UsingLatestModel boolOptional

A read-only field that indicates whether the zone currently is running the latest ML model.

type SubscriptionConfiguration struct{…}
AIAgents SubscriptionConfigurationAIAgentsOptional

Configure blocking behavior for supported personal AI agents.

AnthropicAgent SubscriptionConfigurationAIAgentsAnthropicAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const SubscriptionConfigurationAIAgentsAnthropicAgentDisabled SubscriptionConfigurationAIAgentsAnthropicAgent = "disabled"
const SubscriptionConfigurationAIAgentsAnthropicAgentBlock SubscriptionConfigurationAIAgentsAnthropicAgent = "block"
const SubscriptionConfigurationAIAgentsAnthropicAgentOnlyOnADPages SubscriptionConfigurationAIAgentsAnthropicAgent = "only_on_ad_pages"
GoogleAgent SubscriptionConfigurationAIAgentsGoogleAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const SubscriptionConfigurationAIAgentsGoogleAgentDisabled SubscriptionConfigurationAIAgentsGoogleAgent = "disabled"
const SubscriptionConfigurationAIAgentsGoogleAgentBlock SubscriptionConfigurationAIAgentsGoogleAgent = "block"
const SubscriptionConfigurationAIAgentsGoogleAgentOnlyOnADPages SubscriptionConfigurationAIAgentsGoogleAgent = "only_on_ad_pages"
Instinct SubscriptionConfigurationAIAgentsInstinctOptional

Action to apply to one supported personal AI agent.

One of the following:
const SubscriptionConfigurationAIAgentsInstinctDisabled SubscriptionConfigurationAIAgentsInstinct = "disabled"
const SubscriptionConfigurationAIAgentsInstinctBlock SubscriptionConfigurationAIAgentsInstinct = "block"
const SubscriptionConfigurationAIAgentsInstinctOnlyOnADPages SubscriptionConfigurationAIAgentsInstinct = "only_on_ad_pages"
Muse SubscriptionConfigurationAIAgentsMuseOptional

Action to apply to one supported personal AI agent.

One of the following:
const SubscriptionConfigurationAIAgentsMuseDisabled SubscriptionConfigurationAIAgentsMuse = "disabled"
const SubscriptionConfigurationAIAgentsMuseBlock SubscriptionConfigurationAIAgentsMuse = "block"
const SubscriptionConfigurationAIAgentsMuseOnlyOnADPages SubscriptionConfigurationAIAgentsMuse = "only_on_ad_pages"
OpenAIAgent SubscriptionConfigurationAIAgentsOpenAIAgentOptional

Action to apply to one supported personal AI agent.

One of the following:
const SubscriptionConfigurationAIAgentsOpenAIAgentDisabled SubscriptionConfigurationAIAgentsOpenAIAgent = "disabled"
const SubscriptionConfigurationAIAgentsOpenAIAgentBlock SubscriptionConfigurationAIAgentsOpenAIAgent = "block"
const SubscriptionConfigurationAIAgentsOpenAIAgentOnlyOnADPages SubscriptionConfigurationAIAgentsOpenAIAgent = "only_on_ad_pages"
AIBotsMigrationOptOut boolOptional

Temporary migration flag tracking zones opted out of AI bots managed-rule updates.

AIBotsProtection SubscriptionConfigurationAIBotsProtectionOptional

Enable rule to block AI Scrapers and Crawlers.

One of the following:
const SubscriptionConfigurationAIBotsProtectionBlock SubscriptionConfigurationAIBotsProtection = "block"
const SubscriptionConfigurationAIBotsProtectionDisabled SubscriptionConfigurationAIBotsProtection = "disabled"
const SubscriptionConfigurationAIBotsProtectionOnlyOnADPages SubscriptionConfigurationAIBotsProtection = "only_on_ad_pages"
One of the following:
AITraining SubscriptionConfigurationAITrainingOptional

Configure robots.txt policy for AI model training bots.

One of the following:
const SubscriptionConfigurationAITrainingDisabled SubscriptionConfigurationAITraining = "disabled"
const SubscriptionConfigurationAITrainingDisallow SubscriptionConfigurationAITraining = "disallow"
const SubscriptionConfigurationAITrainingBlock SubscriptionConfigurationAITraining = "block"
const SubscriptionConfigurationAITrainingOnlyOnADPages SubscriptionConfigurationAITraining = "only_on_ad_pages"
AIUser SubscriptionConfigurationAIUserOptional

Configure robots.txt policy for AI assistant and agent bots.

One of the following:
const SubscriptionConfigurationAIUserDisabled SubscriptionConfigurationAIUser = "disabled"
const SubscriptionConfigurationAIUserBlock SubscriptionConfigurationAIUser = "block"
const SubscriptionConfigurationAIUserOnlyOnADPages SubscriptionConfigurationAIUser = "only_on_ad_pages"
AutoUpdateModel boolOptional

Automatically update to the newest bot detection models created by Cloudflare as they are released. Learn more.

BotPreferenceSyncEnabled boolOptional

Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone’s AI Search, AI User, and AI Training preferences.

CfRobotsVariant SubscriptionConfigurationCfRobotsVariantOptional

Specifies the Robots Access Control License variant to use.

One of the following:
const SubscriptionConfigurationCfRobotsVariantOff SubscriptionConfigurationCfRobotsVariant = "off"
const SubscriptionConfigurationCfRobotsVariantPolicyOnly SubscriptionConfigurationCfRobotsVariant = "policy_only"
ContentBotsProtection SubscriptionConfigurationContentBotsProtectionOptional

Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules.

One of the following:
const SubscriptionConfigurationContentBotsProtectionBlock SubscriptionConfigurationContentBotsProtection = "block"
const SubscriptionConfigurationContentBotsProtectionDisabled SubscriptionConfigurationContentBotsProtection = "disabled"
CrawlerProtection SubscriptionConfigurationCrawlerProtectionOptional

Enable rule to punish AI Scrapers and Crawlers via a link maze.

One of the following:
const SubscriptionConfigurationCrawlerProtectionEnabled SubscriptionConfigurationCrawlerProtection = "enabled"
const SubscriptionConfigurationCrawlerProtectionDisabled SubscriptionConfigurationCrawlerProtection = "disabled"
EnableJS boolOptional

Use lightweight, invisible JavaScript detections to improve Bot Management. Learn more about JavaScript Detections.

IsRobotsTXTManaged boolOptional

Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt.

JsdAPIResultsEnabled boolOptional

Whether to use JavaScript Detection results submitted through the API for this zone.

StaleZoneConfiguration SubscriptionConfigurationStaleZoneConfigurationOptional

A read-only field that shows which unauthorized settings are currently active on the zone. These settings typically result from upgrades or downgrades.

FightMode boolOptional

Indicates that the zone’s Bot Fight Mode is turned on.

OptimizeWordpress boolOptional

Indicates that the zone’s wordpress optimization for SBFM is turned on.

SBFMDefinitelyAutomated stringOptional

Indicates that the zone’s definitely automated requests are being blocked or challenged.

SBFMLikelyAutomated stringOptional

Indicates that the zone’s likely automated requests are being blocked or challenged.

SBFMStaticResourceProtection stringOptional

Indicates that the zone’s static resource protection is turned on.

SBFMVerifiedBots stringOptional

Indicates that the zone’s verified bot requests are being blocked.

SuppressSessionScore boolOptional

Whether to disable tracking the highest bot score for a session in the Bot Management cookie.

UsingLatestModel boolOptional

A read-only field that indicates whether the zone currently is running the latest ML model.

Get Zone Bot Management Config

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/bot_management"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  botManagement, err := client.BotManagement.Get(context.TODO(), bot_management.BotManagementGetParams{
    ZoneID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", botManagement)
}
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "ai_agents": {
      "anthropic_agent": "block",
      "google_agent": "block",
      "instinct": "block",
      "muse": "block",
      "openai_agent": "block"
    },
    "ai_bots_migration_opt_out": false,
    "ai_bots_protection": "block",
    "ai_search": "block",
    "ai_training": "disallow",
    "ai_user": "only_on_ad_pages",
    "bot_preference_sync_enabled": true,
    "cf_robots_variant": "policy_only",
    "content_bots_protection": "disabled",
    "crawler_protection": "enabled",
    "enable_js": true,
    "fight_mode": true,
    "is_robots_txt_managed": false,
    "jsd_api_results_enabled": true,
    "stale_zone_configuration": {
      "optimize_wordpress": true,
      "sbfm_definitely_automated": "sbfm_definitely_automated",
      "sbfm_likely_automated": "sbfm_likely_automated",
      "sbfm_static_resource_protection": "sbfm_static_resource_protection",
      "sbfm_verified_bots": "sbfm_verified_bots",
      "suppress_session_score": true
    },
    "using_latest_model": true
  }
}
Returns Examples
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "ai_agents": {
      "anthropic_agent": "block",
      "google_agent": "block",
      "instinct": "block",
      "muse": "block",
      "openai_agent": "block"
    },
    "ai_bots_migration_opt_out": false,
    "ai_bots_protection": "block",
    "ai_search": "block",
    "ai_training": "disallow",
    "ai_user": "only_on_ad_pages",
    "bot_preference_sync_enabled": true,
    "cf_robots_variant": "policy_only",
    "content_bots_protection": "disabled",
    "crawler_protection": "enabled",
    "enable_js": true,
    "fight_mode": true,
    "is_robots_txt_managed": false,
    "jsd_api_results_enabled": true,
    "stale_zone_configuration": {
      "optimize_wordpress": true,
      "sbfm_definitely_automated": "sbfm_definitely_automated",
      "sbfm_likely_automated": "sbfm_likely_automated",
      "sbfm_static_resource_protection": "sbfm_static_resource_protection",
      "sbfm_verified_bots": "sbfm_verified_bots",
      "suppress_session_score": true
    },
    "using_latest_model": true
  }
}