Listener
Who hears an agent's new messages now: its connected client and its webhooks.
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
GET |
/agents/{id}/listeners |
list |
Who listens |
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:
listeners, err := client.Listener(nil).List(map[string]any{"agent_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(listeners)
Lua
Construct client as shown in the Lua setup, then call the operations:
local listeners, err = client:Listener():list({ agent_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$listeners = $client->Listener()->list(["agent_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
listeners = client.Listener().list({"agent_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
listeners = client.Listener.list({ "agent_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const listeners = await client.Listener().list({ agent_id: "example" })
Fields
| Field | Type | Required | Description |
|---|
list
GET /agents/{id}/listeners
Operation ID: listListeners.
Authentication: bearer token (token) or oauth2 (oauth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id |
path |
string |
Yes | The agent's id |
Responses
200: Who listens
application/json
The response is array of object or object.
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 |