List
List every Slack and Discord channel currently connected to your Nairi organization, with platform metadata and the agent each channel is bound to.
Discover Slack and Discord channels your organization has connected. The platform channel_id you discover here is what you pass as connected_channel_id when creating a Scheduled Job.
GET /api/public/v1/connected-channelsExample
curl -X GET https://api.nairi.ai/api/public/v1/connected-channels \
-H "Authorization: Bearer $NAIRI_API_KEY"const res = await fetch(
"https://api.nairi.ai/api/public/v1/connected-channels",
{
headers: {
Authorization: `Bearer ${process.env.NAIRI_API_KEY}`,
},
},
);
const channels = (await res.json()) as Array<{
id: string;
channel_type: string;
channel_id: string;
channel_name: string;
}>;require "net/http"
require "json"
require "uri"
uri = URI("https://api.nairi.ai/api/public/v1/connected-channels")
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "Bearer #{ENV['NAIRI_API_KEY']}"
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |h| h.request(req) }
channels = JSON.parse(res.body)import os
import requests
res = requests.get(
"https://api.nairi.ai/api/public/v1/connected-channels",
headers={"Authorization": f"Bearer {os.environ['NAIRI_API_KEY']}"},
)
channels = res.json()package main
import (
"encoding/json"
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, _ := http.NewRequest(
"GET",
"https://api.nairi.ai/api/public/v1/connected-channels",
nil,
)
req.Header.Set("Authorization", "Bearer "+os.Getenv("NAIRI_API_KEY"))
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
raw, _ := io.ReadAll(res.Body)
var channels []map[string]any
json.Unmarshal(raw, &channels)
fmt.Println(channels)
}Response: 200 OK
[
{
"id": "cc_01KGFV0WN7G22N8HWYDWFHAYBG",
"channel_type": "slack",
"channel_id": "C0AC1J9LF1V",
"channel_name": "ops-nairi",
"team_id": "T08S1TQ0QHX",
"team_name": "Nairi",
"default_agent_id": null,
"default_mode": "",
"auto_reply": true,
"auto_reply_set_at": "2026-10-21T11:03:43.000Z",
"created_at": "2026-02-22T13:06:42.000Z",
"updated_at": "2026-02-22T13:06:42.000Z"
},
{
"id": "cc_01KGWDG8XJ5R9XC4616WX9K1WF",
"channel_type": "discord",
"channel_id": "1405090709790261269",
"channel_name": "ccdemo-1",
"team_id": "1403705745349808210",
"team_name": "My Server",
"default_agent_id": "nairi-brain",
"default_mode": "execute",
"auto_reply": false,
"auto_reply_set_at": null,
"created_at": "2026-03-04T08:00:00.000Z",
"updated_at": "2026-03-04T08:00:00.000Z"
}
]Response fields
| Field | Type | Description |
|---|---|---|
id | string | Internal cc_… record ID. Used by the dashboard. Do not pass this to other endpoints. |
channel_type | string | slack or discord |
channel_id | string | Platform-specific channel ID (Slack Cxxx…, Discord numeric snowflake). This is the value to use as connected_channel_id in scheduled jobs. |
channel_name | string | Channel display name |
team_id | string | Slack team ID or Discord guild ID |
team_name | string | Slack workspace name or Discord server name |
default_agent_id | string | null | Human-readable agent_id slug (for example nairi-brain) of the agent assigned to this channel, or null if none. |
default_mode | string | Default mode for the channel. One of ask (read-only), execute (full access), or "" (no default set). |
auto_reply | boolean | Slack only. true when Nairi acts on every new top-level post in the channel without being tagged. Always false for Discord channels. |
auto_reply_set_at | string | null | When auto-reply was last switched on or off, UTC. null if it was never switched. Always null for Discord channels. |
Changing a channel
PATCH /connected-channels/{id} changes a Slack channel's agent, mode and auto-reply. See Update. POST, PUT and DELETE return 405 Method Not Allowed. To connect a new channel, install the Nairi app in Slack or Discord from the dashboard; to disconnect, remove it there.
Overview
What connected channels are, how to discover the Slack and Discord channels your Nairi organization has connected, and what you can change on them via the REST API.
Update
Partial update of a connected Slack channel: switch auto-reply on or off, and change the agent and mode that answer there. Only the fields you include are changed.