AgentSite
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
POST |
/api/v1/organizations/{organization_id}/agent_sites/{id}/opened |
create |
Success |
GET |
/api/v1/organizations/{organization_id}/agent_sites |
list |
Published sites |
GET |
/api/v1/organizations/{organization_id}/agent_sites/{id} |
load |
Published site |
GET |
/api/v1/organizations/{organization_id}/agent_sites/{id}/icon |
load |
128 pixel WebP icon |
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:
agent_sites, err := client.AgentSite(nil).List(map[string]any{"organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(agent_sites)
agent_site, err := client.AgentSite(nil).Load(map[string]any{"id": "example_id", "organization_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(agent_site)
Lua
Construct client as shown in the Lua setup, then call the operations:
local agent_sites, err = client:AgentSite():list({ organization_id = "example" })
local agent_site, err = client:AgentSite():load({ id = "example_id", organization_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$agent_sites = $client->AgentSite()->list(["organization_id" => "example"]);
$agent_site = $client->AgentSite()->load(["id" => "example_id", "organization_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
agent_sites = client.AgentSite().list({"organization_id": "example"})
agent_site = client.AgentSite().load({"id": "example_id", "organization_id": "example"})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
agent_sites = client.AgentSite.list({ "organization_id" => "example" })
agent_site = client.AgentSite.load({ "id" => "example_id", "organization_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const agent_sites = await client.AgentSite().list({ organization_id: "example" })
const agent_site = await client.AgentSite().load({ id: "example_id", organization_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
author |
object |
Yes | Author |
can_message |
boolean |
Yes | The viewer may send input to the author agent |
deployments_count |
integer |
Yes | Increases with every deploy of the site |
description |
one,string,null |
Yes | The team app description, when the site is a team app |
icon_url |
one,string,null |
Yes | Path of the site's generated icon, versioned by the picture; null until one is generated |
id |
string |
Yes | Id |
name |
string |
Yes | The site's DNS label |
owner |
object |
Yes | The person who controls the author agent |
thread |
any |
Yes | The thread that published the site as a team app, when the viewer can open the author agent |
title |
string |
Yes | The team app title, or the site name read as words |
url |
string |
Yes | Url |
visibility |
string |
Yes | Visibility |
create
POST /api/v1/organizations/{organization_id}/agent_sites/{id}/opened
Operation ID: opened_api_v1_organization_agent_site.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
Idempotency-Key |
header |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
surface |
enum: web, desktop |
Yes | |
view |
enum: frame, external |
Yes | Beside its agent in Composal, or in the person's own browser |
Responses
200: Success
application/json
The response is object.
204: Opening recorded
401: Authentication required
403: Forbidden
404: Site or feature not found
422: Invalid surface, view or missing Idempotency-Key
502: Bad gateway
list
GET /api/v1/organizations/{organization_id}/agent_sites
Operation ID: api_v1_organization_agent_sites.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
cursor |
query |
string |
No |
Responses
200: Published sites
application/json
| Property | Type | Required | Description |
|---|---|---|---|
items |
array of object |
Yes | |
items[].author |
object |
Yes | |
items[].author.id |
string |
Yes | |
items[].author.name |
string |
Yes | |
items[].author.url_slug |
string,null |
Yes | Present when the viewer can open the agent |
items[].can_message |
boolean |
Yes | The viewer may send input to the author agent |
items[].deployments_count |
integer |
Yes | Increases with every deploy of the site |
items[].description |
string,null |
Yes | The team app description, when the site is a team app |
items[].icon_url |
string,null |
Yes | Path of the site's generated icon, versioned by the picture; null until one is generated |
items[].id |
string |
Yes | |
items[].name |
string |
Yes | The site's DNS label |
items[].owner |
object |
Yes | The person who controls the author agent |
items[].owner.id |
string |
Yes | |
items[].owner.name |
string |
Yes | |
items[].thread |
null or object |
Yes | The thread that published the site as a team app, when the viewer can open the author agent |
items[].title |
string |
Yes | The team app title, or the site name read as words |
items[].url |
string |
Yes | |
items[].visibility |
enum: public, org, private |
Yes | |
next_cursor |
string,null |
Yes | Pass as cursor to load sites deployed earlier |
401: Authentication required
403: Forbidden
404: Organization or feature not found
422: Invalid cursor
502: Bad gateway
load
GET /api/v1/organizations/{organization_id}/agent_sites/{id}
Operation ID: api_v1_organization_agent_site.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: Published site
application/json
| Property | Type | Required | Description |
|---|---|---|---|
author |
object |
Yes | |
author.id |
string |
Yes | |
author.name |
string |
Yes | |
author.url_slug |
string,null |
Yes | Present when the viewer can open the agent |
can_message |
boolean |
Yes | The viewer may send input to the author agent |
deployments_count |
integer |
Yes | Increases with every deploy of the site |
description |
string,null |
Yes | The team app description, when the site is a team app |
icon_url |
string,null |
Yes | Path of the site's generated icon, versioned by the picture; null until one is generated |
id |
string |
Yes | |
name |
string |
Yes | The site's DNS label |
owner |
object |
Yes | The person who controls the author agent |
owner.id |
string |
Yes | |
owner.name |
string |
Yes | |
thread |
null or object |
Yes | The thread that published the site as a team app, when the viewer can open the author agent |
title |
string |
Yes | The team app title, or the site name read as words |
url |
string |
Yes | |
visibility |
enum: public, org, private |
Yes |
401: Authentication required
403: Forbidden
404: Site or feature not found
422: Unprocessable entity
502: Bad gateway
GET /api/v1/organizations/{organization_id}/agent_sites/{id}/icon
Operation ID: icon_api_v1_organization_agent_site.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Responses
200: 128 pixel WebP icon
application/json
The response is object.
image/webp
The response is string (binary).