---
title: Thresholds
summary: Manage workspace thresholds.
url: https://www.fastly.com/documentation/reference/api/ngwaf/thresholds
---

Manage workspace thresholds.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `action` | string | The action to take when a threshold is exceeded. Use <code>block_immediately</code> to block every request carrying the configured signal unconditionally, with no rate window applied. When using <code>block_immediately</code>, the <code>interval</code>, <code>limit</code>, <code>duration</code>, and <code>dont_notify</code> fields are stored as provided but not evaluated. Supported only for Pentest, CVE, XXE, and AWS-SSRF signals. |
| `dont_notify` | boolean | Whether to silence notifications when the action is taken. Has no effect when <code>action</code> is <code>block_immediately</code>. Notifications are never sent for that action. |
| `duration` | integer | Duration the action is in place. Default duration is 86,400 seconds (1 day). |
| `enabled` | boolean | Whether this threshold is active. |
| `id` | string | Threshold ID. (Read-only) |
| `interval` | integer | Threshold interval in seconds. Default interval is 3600 seconds (1 hour). |
| `limit` | integer | Threshold limit. Default limit is 10. |
| `name` | string | Threshold name. |
| `signal` | string | The name of the signal this threshold is acting on. |

## API endpoints

### List thresholds

**GET** `/ngwaf/v1/workspaces/{workspace_id}/thresholds`

List configured thresholds for this workspace.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `limit` | integer | query | No | Limit how many results are returned. |
| `workspace_id` | string | path | Yes | The ID of the workspace. |

### Create a new workspace threshold

**POST** `/ngwaf/v1/workspaces/{workspace_id}/thresholds`

Add a new threshold.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `workspace_id` | string | path | Yes | The ID of the workspace. |

### Retrieve threshold

**GET** `/ngwaf/v1/workspaces/{workspace_id}/thresholds/{threshold_id}`

Get a threshold for a workspace.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `threshold_id` | string | path | Yes | The ID of the threshold. |
| `workspace_id` | string | path | Yes | The ID of the workspace. |

### Remove a threshold

**DELETE** `/ngwaf/v1/workspaces/{workspace_id}/thresholds/{threshold_id}`

Delete a threshold.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `threshold_id` | string | path | Yes | The ID of the threshold. |
| `workspace_id` | string | path | Yes | The ID of the workspace. |

### Edit threshold

**PATCH** `/ngwaf/v1/workspaces/{workspace_id}/thresholds/{threshold_id}`

Change attributes of a threshold in a workspace.

**Parameters:**

| Name | Type | In | Required | Description |
|------|------|----|---------|--------------|
| `threshold_id` | string | path | Yes | The ID of the threshold. |
| `workspace_id` | string | path | Yes | The ID of the workspace. |

