> Documentation index for AI agents: https://docs.pagerduty.com/llms.txt

# Update Slack Notification Channels

`PUT https://api.pagerduty.com/integration-slack/incidents/{incident_id}/notification_channels`

Update an incident's slack notification channels.

> ### Important
>
>  Ensure you are using a User API Token or a User OAuth Token to make requests to this API. Also, check that your user has necessary
>  permissions (Owner or Global Admin). See https://developer.pagerduty.com/docs/rest-api-v2/authentication/ for the
>  details.

## Authorization

- **apiKey** (apiKey) — `Authorization` header. The API Key with format `Token token=<API_KEY>`
- **bearerAuth** (http) — HTTP bearer. The Bearer access token with format `Bearer <BEARER TOKEN>`

## Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `incident_id` | string | yes | PagerDuty Incident ID. |

## Request body (`application/json`)

| Field | Type | Required | Description |
|---|---|---|---|
| `channels` | array of object | yes |  |
| `channels[].id` | string |  |  |
| `channels[].slack_team_id` | string |  |  |

Example: Request Example

```json
{
  "channels": [
    {
      "id": "C0123456789",
      "slack_team_id": "T0123456789"
    },
    {
      "id": "C0987654321",
      "slack_team_id": "T0987654321"
    }
  ]
}
```

## Response 200

Returns the new list of Slack Notification Channel.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `channels` | array of object | yes |  |
| `channels[].id` | string |  |  |
| `channels[].name` | string |  |  |
| `channels[].slack_team_id` | string |  |  |
| `channels[].link` | string |  |  |
| `channels[].deep_link` | string |  |  |
| `warnings` | array of string |  | List of failed operations, when the success is only partial. |

Example: Response Example

```json
{
  "channels": [
    {
      "id": "C0123456789",
      "name": "notification1",
      "slack_team_id": "T0123456789",
      "link": "https://slack.com/app_redirect?channel=C0123456789&team=T0123456789",
      "deep_link": "slack://channel?team=T0123456789&id=C0123456789"
    },
    {
      "id": "C0987654321",
      "name": "notification2",
      "slack_team_id": "T0987654321",
      "link": "https://slack.com/app_redirect?channel=C0987654321&team=T0987654321",
      "deep_link": "slack://channel?team=T0987654321&id=C0987654321"
    }
  ]
}
```

## Response 400

Caller provided invalid arguments. Retrying with the same arguments will *not* work.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object | yes |  |
| `error.message` | string | yes | Error message string. Read-only. |

Example: Invalid payload provided

```json
{
  "error": {
    "message": "The payload is invalid."
  }
}
```

## Response 401

Caller did not supply credentials or did not provide the correct credentials.
If you are using an API key, it may be invalid or your Authorization header may be malformed.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object | yes |  |
| `error.message` | string | yes | Error message string. Read-only. |

Example: Unauthorized

```json
{
  "error": {
    "message": "Unauthorized"
  }
}
```

## Response 403

Caller is not authorized to view the requested resource.
While your authentication is valid, the authenticated user or token does not have permission to perform this action.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object | yes |  |
| `error.message` | string | yes | Error message string. Read-only. |

Example: Forbidden

```json
{
  "error": {
    "message": "Forbidden"
  }
}
```

## Response 404

The requested resource was not found.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object | yes |  |
| `error.message` | string | yes | Error message string. Read-only. |

Example: Not Found

```json
{
  "error": {
    "message": "Not Found"
  }
}
```

Example: Invalid Workspace

```json
{
  "error": {
    "message": "The PagerDuty has not been connected to this workspace. Please complete the installation and try again."
  }
}
```

## Response 422

The request could not be performed successfully, because some validations failed.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object | yes |  |
| `error.message` | string | yes | Error message string. Read-only. |

Example: UnprocessableEntity

```json
{
  "error": {
    "message": "UnprocessableEntity"
  }
}
```

## Response 500

Request resulted in internal server error.

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | object | yes |  |
| `error.message` | string | yes | Error message string. Read-only. |

Example: Internal Server Error

```json
{
  "error": {
    "message": "Internal Server Error"
  }
}
```

## Developer Agreement

Your access to and use of the PagerDuty Developer Services is governed by the [PagerDuty Developer Agreement](https://docs.pagerduty.com/developer/pagerduty-developer-agreement).
