API

SlackChannel

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/slack/channels list Channels visible to this agent bot, with Slack pagination

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

slack_channels, err := client.SlackChannel(nil).List(map[string]any{"agent_id": "example", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(slack_channels)

Lua

Construct client as shown in the Lua setup, then call the operations:

local slack_channels, err = client:SlackChannel():list({ agent_id = "example", organization_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$slack_channels = $client->SlackChannel()->list(["agent_id" => "example", "organization_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

slack_channels = client.SlackChannel().list({"agent_id": "example", "organization_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

slack_channels = client.SlackChannel.list({ "agent_id" => "example", "organization_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const slack_channels = await client.SlackChannel().list({ agent_id: "example", organization_id: "example" })

Fields

Field Type Required Description
id string Yes Id
is_member boolean Yes Is Member
is_private boolean Yes Is Private
is_slack_connect boolean Yes Is Slack Connect
name string Yes Name
published boolean Yes Published

list

GET /api/v1/organizations/{organization_id}/agents/{id}/spark/slack/channels

Operation ID: spark_slack_channels_api_v1_organization_persistent_agent.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes
cursor query string No
q query string No
refresh query boolean No
kind query enum: public, private No Only public channels, or only private channels the bot is in; both when omitted

Responses

200: Channels visible to this agent bot, with Slack pagination

application/json

Property Type Required Description
channels array of object Yes
channels[].id string Yes
channels[].is_member boolean Yes
channels[].is_private boolean Yes
channels[].is_slack_connect boolean Yes
channels[].name string Yes
channels[].published boolean Yes
next_cursor string,null Yes
401: Unauthorized
403: Agent publishing authority required
404: Not found
422: Slack rejected the channel listing
502: Bad gateway
503: Slack unavailable or rate limited

application/json

Property Type Required Description
error string Yes
retry_after_seconds integer No