> This page is for version 2025-09-18 (default).
> For other versions, use one of these documentation indexes:
> - 2025-09-18 (default): https://apidocs.polytomic.com/2025-09-18/llms.txt
> - 2024-02-08: https://apidocs.polytomic.com/2024-02-08/llms.txt
> - 2023-04-25: https://apidocs.polytomic.com/2023-04-25/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.

# Replaces the Slack error notification channel at this scope.

PUT https://app.polytomic.com/api/notifications/global-error-slack-channel
Content-Type: application/json

Replaces the Slack error notification channel at this scope.

Send both `installation_id` and `channel_id`. Polytomic validates the channel
before replacing the selection. Failed validation leaves the current channel
unchanged. Syncs without an explicit channel inherit this selection.

A missing installation returns `404`; a disconnected installation returns `409`.
An ineligible channel returns `400`. Slack rate limits return `429` with a
`Retry-After` header, and an unavailable Slack connection returns `503`.

The response includes the explicit channel, the Organization default available to
a sync, and the effective channel after inheritance. A sync's explicit channel
takes precedence even if its workspace disconnects. `effective_binding` describes
configuration, not delivery health. Names reflect the last channel selection.

Reading saved settings and removing a channel work even when Slack is disabled.
Setting a channel requires Slack to be enabled for your Organization and
configured for your deployment. These settings leave email subscribers unchanged.

Organization members can read saved settings without additional permissions.
Changing a sync's channel requires Edit permission on that sync. Changing the
global channel requires Edit permission on Organization settings.
Organization-scoped credentials are also supported.
Read-only API keys can read settings and discover workspace channels but cannot
change notification settings.

Slack authorization and reconnection remain available in Organization settings
in the web application.

Reference: https://apidocs.polytomic.com/api-reference/notifications/set-global-error-slack-channel

## Authentication

- `Authorization` header (bearer token, required) — Bearer user API key
- `Authorization` header (basic auth, required) — Basic organization-scoped API key

## Request

### Body (application/json)

This endpoint expects a SetSlackNotificationRequest.

- `channel_id` (string, required) — ID of an eligible Slack channel where Polytomic is invited
- `installation_id` (string, required) — Organization-specific installation ID from the Slack workspace list

## Response

### 200

OK

- `data` (SlackNotificationSettings, optional) — Slack error notification configuration

## Errors

### 400 Bad Request Error

Bad Request

- `key` (string, optional) — Machine-readable error key, when the error has one
- `message` (string, optional) — Error message
- `metadata` (map from string to any, optional) — Structured details about the error, when available
- `status` (integer, optional) — HTTP status code

### 401 Unauthorized Error

Unauthorized

- `key` (string, optional) — Machine-readable error key, when the error has one
- `message` (string, optional) — Error message
- `metadata` (map from string to any, optional) — Structured details about the error, when available
- `status` (integer, optional) — HTTP status code

### 403 Forbidden Error

Forbidden

- `key` (string, optional) — Machine-readable error key, when the error has one
- `message` (string, optional) — Error message
- `metadata` (map from string to any, optional) — Structured details about the error, when available
- `status` (integer, optional) — HTTP status code

### 404 Not Found Error

Not Found

- `key` (string, optional) — Machine-readable error key, when the error has one
- `message` (string, optional) — Error message
- `metadata` (map from string to any, optional) — Structured details about the error, when available
- `status` (integer, optional) — HTTP status code

### 409 Conflict Error

Conflict

- `key` (string, optional) — Machine-readable error key, when the error has one
- `message` (string, optional) — Error message
- `metadata` (map from string to any, optional) — Structured details about the error, when available
- `status` (integer, optional) — HTTP status code

### 429 Too Many Requests Error

Too Many Requests

- `key` (string, optional) — Machine-readable error key, when the error has one
- `message` (string, optional) — Error message
- `metadata` (map from string to any, optional) — Structured details about the error, when available
- `status` (integer, optional) — HTTP status code

### 500 Internal Server Error

Internal Server Error

- `key` (string, optional) — Machine-readable error key, when the error has one
- `message` (string, optional) — Error message
- `metadata` (map from string to any, optional) — Structured details about the error, when available
- `status` (integer, optional) — HTTP status code

### 503 Service Unavailable Error

Service Unavailable

- `key` (string, optional) — Machine-readable error key, when the error has one
- `message` (string, optional) — Error message
- `metadata` (map from string to any, optional) — Structured details about the error, when available
- `status` (integer, optional) — HTTP status code

## Types

### SlackNotificationSettings

- `binding` (SlackNotificationBinding, optional, nullable) — Channel explicitly selected at this scope, or null
- `default_binding` (SlackNotificationBinding, optional, nullable) — Organization default for a sync, or null
- `effective_binding` (SlackNotificationBinding, optional, nullable) — Configured channel after applying inheritance; this is not a delivery health check
- `source` (enum, optional) — Scope supplying the effective channel
  - Allowed values: `sync`, `organization`, `none`

### SlackNotificationBinding

- `channel_id` (string, optional) — Slack channel ID
- `channel_name` (string, optional) — Channel name saved when this channel was selected
- `installation_id` (string, optional) — Organization-specific installation ID from the Slack workspace list
- `visibility` (enum, optional) — Channel visibility when it was selected
  - Allowed values: `public`, `private`
- `workspace_name` (string, optional) — Workspace name saved when this channel was selected

## Examples

**Request**

```json
{
  "channel_id": "string",
  "installation_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
}
```

**Response**

```json
{
  "data": {
    "binding": {
      "channel_id": "string",
      "channel_name": "string",
      "installation_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
      "visibility": "public",
      "workspace_name": "string"
    },
    "default_binding": {
      "channel_id": "string",
      "channel_name": "string",
      "installation_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
      "visibility": "public",
      "workspace_name": "string"
    },
    "effective_binding": {
      "channel_id": "string",
      "channel_name": "string",
      "installation_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
      "visibility": "public",
      "workspace_name": "string"
    },
    "source": "sync"
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.polytomic.com/api/notifications/global-error-slack-channel"

payload = {
    "channel_id": "string",
    "installation_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.polytomic.com/api/notifications/global-error-slack-channel';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"channel_id":"string","installation_id":"248df4b7-aa70-47b8-a036-33ac447e668d"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://app.polytomic.com/api/notifications/global-error-slack-channel"

	payload := strings.NewReader("{\n  \"channel_id\": \"string\",\n  \"installation_id\": \"248df4b7-aa70-47b8-a036-33ac447e668d\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.polytomic.com/api/notifications/global-error-slack-channel")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"channel_id\": \"string\",\n  \"installation_id\": \"248df4b7-aa70-47b8-a036-33ac447e668d\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://app.polytomic.com/api/notifications/global-error-slack-channel")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"channel_id\": \"string\",\n  \"installation_id\": \"248df4b7-aa70-47b8-a036-33ac447e668d\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://app.polytomic.com/api/notifications/global-error-slack-channel', [
  'body' => '{
  "channel_id": "string",
  "installation_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.polytomic.com/api/notifications/global-error-slack-channel");
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"channel_id\": \"string\",\n  \"installation_id\": \"248df4b7-aa70-47b8-a036-33ac447e668d\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "channel_id": "string",
  "installation_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://app.polytomic.com/api/notifications/global-error-slack-channel")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```