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

# Create a Slack Dedicated Channel

`POST https://api.pagerduty.com/integration-slack/incidents/{incident_id}/dedicated_channel`

Creates an incident's slack dedicated channel.

> ### 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 |
|---|---|---|---|
| `channel` | object | yes |  |
| `channel.name` | string |  |  |
| `channel.slack_team_id` | string |  |  |
| `channel.privacy` | string |  | One of: `private`, `public`. |

Example: Request Example

```json
{
  "channel": {
    "name": "dedicated",
    "privacy": "public",
    "slack_team_id": "T0123456789"
  }
}
```

## Response 201

Returns created Slack Dedicated Channel.

Headers:

| Header | Type | Description |
|---|---|---|
| `Location` | string | The path to get the new incident dedicated channel info |

### `application/json`

| Field | Type | Required | Description |
|---|---|---|---|
| `channel` | object | yes |  |
| `channel.id` | string |  |  |
| `channel.name` | string |  |  |
| `channel.slack_team_id` | string |  |  |
| `channel.link` | string |  |  |
| `channel.deep_link` | string |  |  |
| `warnings` | array of string |  | List of unblocking events that can possibly occur durring the channel creation. |

Example: Response Example

```json
{
  "channel": {
    "id": "C0123456789",
    "name": "dedicated",
    "slack_team_id": "T0123456789",
    "link": "https://slack.com/app_redirect?channel=C0123456789&team=T0123456789",
    "deep_link": "slack://channel?team=T0123456789&id=C0123456789"
  }
}
```

## 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).
