---
title: "Edge Cache Defensive Mode"
method: PUT
path: "/sites/{id}/edge-cache/defensive-mode"
tags: ["sites"]
---

# Edge Cache Defensive Mode

`PUT /sites/{id}/edge-cache/defensive-mode`

## Request

- Base URL: `https://my.pressable.com/v1`
- URL: `https://my.pressable.com/v1/sites/{id}/edge-cache/defensive-mode`
- Auth: none declared
- TypeScript: <https://skmtc.dev/pressable/apis/pressable-api-documentation-v1/docs/sites/:id/edge-cache/defensive-mode/put.ts> (a function with typed inputs; its response is checked against the schema)

This mode adds an extra layer of protection against spam bots and DDoS attacks. When enabled, it requires visitors' browsers to complete a small task before accessing the site, which helps block malicious traffic. Legitimate users might see a brief challenge page before they can proceed. Edge Cache must be enabled on the site to turn this feature on; turning it off does not require Edge Cache, so a site whose Edge Cache is off can still remove the challenge page.

## Path parameters

- `id` integer, required

## Request body

- object
  - `duration` string

## Response `200`

Successful Response

- object
  - `message` string
  - `data` object

---

[API](https://skmtc.dev/pressable/apis/pressable-api-documentation-v1.md) - [All operations](https://skmtc.dev/pressable/apis/pressable-api-documentation-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/pressable/apis/pressable-api-documentation-v1/revisions/267a95219f47?raw)
