---
title: Add channels to Slack integration
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Slack Integration
---

# Add channels to Slack integration{% #add-channels-to-slack-integration %}
Copy pageCopied
{% tab title="v1" %}

| Datadog site      | API endpoint                                               |
| ----------------- | ---------------------------------------------------------- |
| ap1.datadoghq.com | PUT https://api.ap1.datadoghq.com/api/v1/integration/slack |
| ap2.datadoghq.com | PUT https://api.ap2.datadoghq.com/api/v1/integration/slack |
| app.datadoghq.eu  | PUT https://api.datadoghq.eu/api/v1/integration/slack      |
| app.ddog-gov.com  | PUT https://api.ddog-gov.com/api/v1/integration/slack      |
| us2.ddog-gov.com  | PUT https://api.us2.ddog-gov.com/api/v1/integration/slack  |
| app.datadoghq.com | PUT https://api.datadoghq.com/api/v1/integration/slack     |
| us3.datadoghq.com | PUT https://api.us3.datadoghq.com/api/v1/integration/slack |
| us5.datadoghq.com | PUT https://api.us5.datadoghq.com/api/v1/integration/slack |

### Overview



**Deprecated**: This endpoint is deprecated.

This method **completely rewrites** your integration configuration by **replacing** your current configuration with the new one sent to your Datadog organization. Please ensure that all fields—including the Slack webhook URL—are valid because an invalid URL will break your Slack notifications.



### Request

#### Body Data (required)

Update an existing Datadog-Slack integration request body.

{% tab title="Model" %}

| Parent field | Field                          | Type     | Description                                                                                                                                               |
| ------------ | ------------------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | channels                       | [object] | An array of slack channel configurations.                                                                                                                 |
| channels     | account [*required*]      | string   | Account to which the channel belongs to.                                                                                                                  |
| channels     | channel_name [*required*] | string   | Your channel name.                                                                                                                                        |
| channels     | transfer_all_user_comments     | boolean  | To be notified for every comment on a graph, set it to `true`. If set to `False` use the `@slack-channel_name` syntax for comments to be posted to slack. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "channels": [
    {
      "account": "jane.doe",
      "channel_name": "#general",
      "transfer_all_user_comments": false
    }
  ]
}
```

{% /tab %}

### Response

{% tab title="204" %}
OK
{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Authentication error
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
Error response object.

| Field                    | Type     | Description                          |
| ------------------------ | -------- | ------------------------------------ |
| errors [*required*] | [string] | Array of errors returned by the API. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
 \# Curl command curl -X PUT "https://api.datadoghq.com/api/v1/integration/slack" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "channels": [
    {
      "account": "Main_Account",
      "channel_name": "#channel_name_main_account",
      "transfer_all_user_comments": false
    }
  ]
}
EOF 
                
{% /tab %}
