API

Channel

The channels an agent can send and receive on, with the labels and the size limits of each.

Operations

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

Method Route SDK operation Returns
GET /agents/{id}/channels list The channels

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:

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

Lua

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

local channels, err = client:Channel():list({ agent_id = "example" })

PHP

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

$channels = $client->Channel()->list(["agent_id" => "example"]);

Python

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

channels = client.Channel().list({"agent_id": "example"})

Ruby

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

channels = client.Channel.list({ "agent_id" => "example" })

TypeScript

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

const channels = await client.Channel().list({ agent_id: "example" })

Fields

Field Type Required Description
kind string Yes The channel's kind, which messages and events name
labels object Yes Words a client builds its texts about the channel from
limits object Yes The most a message on the channel carries
name string Yes What people and agents call the channel, like Telegram

list

GET /agents/{id}/channels

Operation ID: listChannels.

Authentication: bearer token (token) or oauth2 (oauth).

Parameters

Parameter In Type Required Description
id path string Yes The agent's id

Responses

200: The channels

application/json

Property Type Required Description
[].kind string Yes The channel's kind, which messages and events name
[].labels object Yes Words a client builds its texts about the channel from
[].labels.address string Yes What an agent has on the channel, like bot
[].labels.contact string Yes How to write someone on the channel, like user id, group id or @username
[].labels.token string No What connecting an address takes, like bot token from @BotFather
[].limits object Yes The most a message on the channel carries
[].limits.fileSize integer No The most bytes in one file; none without a limit
[].limits.files integer Yes The most files a message carries
[].limits.recipients integer Yes The most recipients a message goes to
[].limits.text integer Yes The most characters a message holds
[].name string Yes What people and agents call the channel, like Telegram
4XX: The request failed; the error says why

application/json

Property Type Required Description
error object Yes
error.code enum: invalid_input, unauthorized, forbidden, plan_limit, not_found, conflict, ... Yes
error.message string Yes
5XX: The request failed; the error says why

application/json

Property Type Required Description
error object Yes
error.code enum: invalid_input, unauthorized, forbidden, plan_limit, not_found, conflict, ... Yes
error.message string Yes