Skip to main content
POST
Turn a BotShield Action on or off

Authorizations

Authorization
string
header
required

Your secret server API key (bs_dev_… or bs_production_…) with Gates API access: the gates:write scope, granted in the Console under Settings → Developer Tools → API Keys. Without it every Gates API call answers gates_scope_required. The organization and environment always come from the key. Site keys are refused.

Body

application/json
actKey
string
required

The action's key (input is lower-cased).

Pattern: ^[A-Za-z0-9][A-Za-z0-9_-]{0,39}$
Example:

"watch"

state
enum<string>
required
Available options:
live,
off
Example:

"off"

Response

The action. NOTE: handler errors also arrive here (HTTP 200) as data.error — codes: invalid_key (401 — missing, malformed or inactive key), gates_scope_required (403 — the key lacks Gates API access), org_not_found (404), action_not_found (404), internal (500).

data
object
required