Related guides
Endpoints
Next steps
- API overview: base URLs, authentication, and pagination
- Errors: status codes and the error format
- Editions: which endpoints each edition serves
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Connect hosted agents to Slack, decide who can reach them, approve their actions, and manage who they may message with the OneCLI API.
| Endpoint | Method and path | What it does |
|---|---|---|
| Get an agent’s channels | GET /agents/{agentId}/channels | Get where a hosted agent is reachable, who may reach it there, and the health of each channel connection. |
| Get the setup material for a channel | GET /agents/{agentId}/channels/{provider}/manifest | Get the setup material to create a channel app by hand, such as the Slack app manifest for your chosen transport. |
| Attach a channel (guided) | POST /agents/{agentId}/channels/{provider} | Connect a hosted agent to a channel such as Slack. |
| Detach a channel | DELETE /agents/{agentId}/channels/{provider} | Remove a hosted agent from a channel, with its reach decisions and tokens. |
| Complete a channel attach with pasted tokens | POST /agents/{agentId}/channels/{provider}/complete | Finish connecting a channel by pasting the provider app’s tokens, for socket transport or a manual setup. |
| Decide who may reach the agent in a space | PUT /agents/{agentId}/channels/{provider}/reach/{externalRef} | Decide who may talk to a hosted agent in a channel space: everyone, OneCLI members only, or no one. |
| Forget a space | DELETE /agents/{agentId}/channels/{provider}/reach/{externalRef} | Clear the reach decision for a channel space so the next message from a stranger there asks for approval again. |
| Decide whether a person may reach the agent | PUT /agents/{agentId}/channels/{provider}/reach/people/{externalRef} | Approve or block one person from sending direct messages to a hosted agent on a channel. |
| Forget a person | DELETE /agents/{agentId}/channels/{provider}/reach/people/{externalRef} | Clear a person’s reach decision for a hosted agent so their next direct message asks for approval again. |
| List an agent’s action approvals | GET /agents/{agentId}/approvals | List the approvals a hosted agent requested before taking an action, such as sending a message, newest first. |
| Decide an action approval | POST /agents/{agentId}/approvals/{approvalId}/decision | Approve an agent’s action once, approve it always, or reject it with a reason the hosted agent can see. |
| List an agent’s contacts | GET /agents/{agentId}/contacts | List a hosted agent’s outbound contacts and whether it may message each one without asking first. |
| Set a contact’s policy | PUT /agents/{agentId}/contacts/{contactId} | Allow, block, or require approval for a hosted agent to message a contact on its own initiative. |
| Remove a contact | DELETE /agents/{agentId}/contacts/{contactId} | Remove a contact from a hosted agent’s address book so messaging them goes back to asking for approval. |
| List an agent’s peers | GET /agents/{agentId}/links | List the other hosted agents this agent may message, with both sides’ decisions and their shared conversation. |
| Set this agent’s side of a peer link | PUT /agents/{agentId}/links/{peerAgentId} | Allow, block, or require approval for a hosted agent to message another agent in the workspace. |
| Forget a peer | DELETE /agents/{agentId}/links/{peerAgentId} | Remove a peer relationship from one hosted agent’s side, with its pair conversation and pending approvals. |
| Resume a paused pair conversation | POST /agents/{agentId}/links/{peerAgentId}/resume | Let two hosted agents keep talking after their conversation hit its turn cap. |