Skip to main content
PUT
Set the bot protection level of an environment

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

env_id
string
required
Example:

"54fb80af-576c-4fdc-ba4f-b596c83f15a1"

Body

application/json
level
enum<string>
required

The bot protection tier to apply to the environment:

  • block-malicious-traffic
    • What it does: Provides essential protection against malicious traffic.
    • Recommended for: Always-on protection from Kinsta.
  • block-automations
    • What it does: Blocks automated traffic while allowing humans and verified bots.
    • Recommended for: Most sites.
  • challenge-bots
    • What it does: Challenges suspicious automated requests while allowing legitimate traffic.
    • Recommended for: Sites seeing increased scraping, spam, or suspicious traffic.
  • challenge-everyone
    • What it does: All unverified traffic is challenged, including humans.
    • Recommended for: Sites under active attack or dealing with sustained abuse.
Available options:
block-malicious-traffic,
block-automations,
challenge-bots,
challenge-everyone
Example:

"block-automations"

Response

Setting the bot protection level started. Use the operation_id to check the status.

message
string
required
Example:

"Setting a bot protection level in progress. Use the operation_id to check the status."

status
number
required
Example:

202

operation_id
string
Example:

"environment:set-bot-protection-level-54fb80af-576c-4fdc-ba4f-b596c83f15a1"