> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wirespeed.co/llms.txt
> Use this file to discover all available pages before exploring further.

# PagerDuty

> Integrate with PagerDuty to sync Wirespeed cases as incidents

## Integrate Wirespeed with PagerDuty

1. Login to Wirespeed and navigate to Integrations > [**Add Integration**](https://app.wirespeed.co/settings/integrations?tab=browse)
2. Select **PagerDuty** and click **Integrate**
3. A new tab will open in which Wirespeed is requesting permission to read and write PagerDuty incidents
4. Click **Accept** to grant Wirespeed access to your PagerDuty account
5. Navigate back to Wirespeed and refresh the [integrations](https://app.wirespeed.co/settings/integrations) page
6. Click on the newly added "PagerDuty" integration
7. A configuration modal will open, prompting you to select:
   1. the PagerDuty **Service** that new incidents are created on
   2. an optional **Case Incident Title Template**
8. Click **Save**

## Required Permissions

Wirespeed requests the following OAuth scopes when connecting to PagerDuty:

* `incidents.read`
* `incidents.write`
* `services.read`
* `users.read`
* `webhook_subscriptions.read`
* `webhook_subscriptions.write`

## Webhook Setup

PagerDuty-to-Wirespeed sync (closing a case when its incident is resolved, marking a case as responded to, or adding notes) only happens when a webhook is configured.

When you save the integration configuration, Wirespeed tries to create the PagerDuty webhook subscription automatically if the connected token has the `webhook_subscriptions.read` and `webhook_subscriptions.write` scopes. The subscription is scoped to the configured service and subscribes to `incident.resolved`, `incident.acknowledged`, and `incident.annotated`.

## Supported Sync Behavior

**Wirespeed to PagerDuty:**

* Create an incident when a case is escalated
* Resolve the incident when the case is closed
* Add a note to the incident when a detection is added to the case
* Add the close note to the incident when a case is closed with notes

**PagerDuty to Wirespeed** (requires a configured webhook):

* Close the case when the incident is resolved
* Mark the case as responded to and add a case note when the incident is acknowledged
* Add a note to the case when the incident is annotated
