Connected Channels (read-only)

List

List Slack and Discord channels connected to your organization.

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.

When you create a scheduled job, pass the platform channel_id (for example C09M8FRJYTF for Slack, or the numeric snowflake for Discord), not the cc_… internal id. The cc_… id is only used inside Nairi to reference the connection record. The API will reject a cc_… value with 400 channel ... not found in organization.

GET /api/public/v1/connected-channels

Example

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": "",
    "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",
    "created_at": "2026-03-04T08:00:00.000Z",
    "updated_at": "2026-03-04T08:00:00.000Z"
  }
]

Response fields

FieldTypeDescription
idstringInternal cc_… record ID. Used by the dashboard. Do not pass this to other endpoints.
channel_typestringslack or discord
channel_idstringPlatform-specific channel ID (Slack Cxxx…, Discord numeric snowflake). This is the value to use as connected_channel_id in scheduled jobs.
channel_namestringChannel display name
team_idstringSlack team ID or Discord guild ID
team_namestringSlack workspace name or Discord server name
default_agent_idstring | nullHuman-readable agent_id slug (for example nairi-brain) of the agent assigned to this channel, or null if none.
default_modestringDefault mode for the channel. One of ask (read-only), execute (full access), or "" (no default set).

Read-only endpoint

/connected-channels only supports GET. POST, PATCH, PUT, and DELETE all 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.

On this page