# Update Incident — PagerDuty

> Update an incident's status, title, urgency, priority, escalation policy, or assignments. Use List Incidents or Get Incident to find the incident ID. To acknowledge: set status to acknowledged. To resolve: set status to resolved. Use List…

- Key: `pagerduty-update-incident`
- Type: Action (Write)
- Version: 0.0.2
- App: PagerDuty (`pagerduty`) — https://pipedream.com/apps/pagerduty.md
- This page (HTML): https://pipedream.com/apps/pagerduty/actions/update-incident
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/pagerduty/actions/update-incident/update-incident.mjs

## Description

Update an incident's status, title, urgency, priority, escalation policy, or assignments. Use **List Incidents** or **Get Incident** to find the incident ID. To acknowledge: set `status` to `acknowledged`. To resolve: set `status` to `resolved`. Use **List Users** to find user IDs for assignments and **List Priorities** for priority IDs. [See the documentation](https://developer.pagerduty.com/api-reference/8a0e1aa2ec666-update-an-incident)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `incidentId` | `string` | Yes | The ID of the incident to update. Use List Incidents to find IDs. |
| `status` | `string` | No | New status for the incident. Options: acknowledged, resolved. |
| `title` | `string` | No | New title for the incident. |
| `urgency` | `string` | No | New urgency level. Options: high, low. |
| `priorityId` | `string` | No | New priority. Use List Priorities to discover valid IDs. |
| `escalationPolicyId` | `string` | No | Reassign to a different escalation policy. Use List Escalation Policies to find IDs. |
| `assignments` | `string[]` | No | Replace current assignments with these user IDs. Use List Users to find IDs. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "pagerduty",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "pagerduty-update-incident",
  arguments: {
    incidentId: "Incident ID",
    status: "Status",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "pagerduty-update-incident",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    pagerduty: { authProvisionId: "apn_xxxxxxx" },
    incidentId: "Incident ID",
    status: "Status",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "pagerduty-update-incident",
    "configured_props": {
      "pagerduty": { "authProvisionId": "apn_xxxxxxx" },
      "incidentId": "Incident ID",
      "status": "Status"
    }
  }'
```

---

- App: https://pipedream.com/apps/pagerduty.md · All apps: https://pipedream.com/apps
