---
title: Workspace alerts
summary: Workspace alerts endpoints provide functionality for adding, editing, and deleting alerts.
url: https://www.fastly.com/documentation/reference/api/ngwaf/workspace-alerts
---

Workspace alerts endpoints provide functionality for adding, editing, and deleting alerts.

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `config` | object | Configuration specific to the workspace integration <code>type</code>. |
| `description` | string | An optional description for the alert. |
| `events` | array | List of event types that trigger this webhook. |
| `type` | string | Type of the workspace integration. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `key` | string | Datadog integration key. |
| `site` | string | Datadog site. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `host` | string | Host name of the Jira instance. |
| `issue_type` | string | The Jira issue type associated with the ticket. |
| `key` | string | Jira API key (secret field). |
| `project` | string | Specifies the Jira project where the issue will be created. |
| `username` | string | Jira username of the user who created the ticket. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `address` | string | An email address. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `webhook` | string | Microsoft Teams webhook. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `key` | string | Opsgenie integration key. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `key` | string | PagerDuty integration key. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `webhook` | string | Slack webhook. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `webhook` | string | Webhook URL. |

## Data model

| Field | Type | Description |
|-------|------|-------------|
| `flag` | string | Event that occurs when an IP address is detected as a potential threat. |

## API endpoints

### List workspace alerts

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

List all alerts of a given 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 workspace alert

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

Create a workspace alert.

**Parameters:**

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

### Get a workspace alert

**GET** `/ngwaf/v1/workspaces/{workspace_id}/alerts/{alert_id}`

Retrieve a workspace alert.

**Parameters:**

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

### Remove a workspace alert

**DELETE** `/ngwaf/v1/workspaces/{workspace_id}/alerts/{alert_id}`

Delete a workspace alert.

**Parameters:**

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

### Edit a workspace alert

**PATCH** `/ngwaf/v1/workspaces/{workspace_id}/alerts/{alert_id}`

Make changes to a workspace alert.

**Parameters:**

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

### Get workspace alert signing key

**GET** `/ngwaf/v1/workspaces/{workspace_id}/alerts/{alert_id}/signing-key`

Retrieves details of a workspace alert signing key. Only allowed on webhook alert.

**Parameters:**

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

### Rotate workspace alert signing key

**POST** `/ngwaf/v1/workspaces/{workspace_id}/alerts/{alert_id}/signing-key`

Rotate workspace alert signing key. Only allowed on webhook alert.

**Parameters:**

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

### Test workspace alert

**POST** `/ngwaf/v1/workspaces/{workspace_id}/alerts/{alert_id}/test`

Tests a workspace alert by sending a test notification to verify the alert is configured correctly and reachable.

**Parameters:**

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

