# Change the protection level

`PUT /v1/service/@id/waf/zones/@zone/waf-mode` · scope `waf:write`

Body `mode`: `off`, `audit`, `balanced` or `strict`. Returns the website.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/v1/service/@id/waf/zones/@zone/waf-mode` |
| Method | `PUT` |
| Scope | `waf:write` |
| Header | `Authorization: Bearer <token>` |
| Content-Type | `application/json` |
| Tokens that can call it | app tokens (`tinoat_`), personal API tokens (`tinopat_`) |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | int | yes | Service ID |
| `zone` | path | string | yes | Website ID (UUID) on TinoWAF |
| `mode` | body | string | yes | Protection level: `off`, `audit`, `balanced` or `strict`. |

## Example request

```bash
curl -X PUT "https://api.tino.vn/v1/service/100001/waf/zones/3f2a1b0c-9d8e-4f7a-b6c5-d4e3f2a1b0c9/waf-mode" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "balanced"
}'
```

`$TINO_TOKEN` is a token with the scope `waf:write`. Path parameters in the example are sample values.

SDK ([SDK & examples](/en/docs/sdk)): no dedicated function yet, use `client.request("PUT", "/service/@id/waf/zones/@zone/waf-mode")`.

## Example response

No live sample: the route changes real data or the test account has no data for it. The answer is a JSON object; errors follow the common shape in [Calling the Tino API](/en/docs/api#errors).
