Bot settings, team rules, setup manifests and computer operations
Developer·7 minutes to read
What it does
How an administrator runs the organisation's bots from a script, each through the same engine as its screen, so a change made here is what the screen shows on its next load:
- Bot settings (Organisation → Policies, and a group's settings page): whether bots are on, what they may do, the automatic reviewer, who may use bots, and where their computers may connect.
- Team rules (Organisation → Rules): standing instructions every member's bot reads on the surfaces each rule names. A rule reaches each member's next run.
- Setup manifests (Organisation → Setup): what every member's computer runs when it starts. A change runs only once a second administrator approves it.
- Computer operations (Organisation → Computers): stop, recreate, terminate or delete many members' computers in one operation, and read its progress.
Organisation secrets have no route: they are set on the dashboard only. The same policy is also served as one resource on /api/v1/policy/bots (Bot policy, team rules and setup scripts); both are doors onto the same settings.
Authentication
A read key reads GET /api/v1/bot-settings. Every other call on this page needs an admin key from a current owner or admin; a read or write key on one of them is 401.
Request
Bot settings
GET /api/v1/bot-settings— the whole resource:enabled— off, no member starts a run; their computers, bots and history are kept, and turning bots back on finds each computer as it was.capabilities—templateSharing(off,teamorpublic),actionRecording,localExecutionCeiling(the most any member's desktop may allow:always_allow,ask_every_timeornever_allow),codingAgentDelegation(whether a bot may hand coding work to a connected coding tool) andmcpServersOnComputer.approvalReview—enforced(the automatic reviewer runs on every member's run, whatever the member's own Auto-review setting; a run an inbound channel message started keeps its own) and the reviewer'sallowandblockinstructions.autoReview.enforcedForTeamBotsis the same switch under its earlier name.access—mode(allmembers, or chosengroups) andgroupIds. A member outside the chosen groups is refused when a run starts.network—egressMode(unset,allow_all,default_with_network_settingsornetwork_settings_only) andallowlist, the organisation's own destinations (hostorhost:port). A computer applies the policy when it next starts or polls.lockedis alwaystrue: members never change the network setting in this product, only an administrator does.directoryGroups— the groups that mirror a directory group (Enterprise).
PATCH /api/v1/bot-settings— any of the sections above; inside a section, any of its fields.allowandblock(up to 20 each, 500 characters each),groupIdsandnetwork.allowlist(up to 500) replace the stored list. TurningactionRecordingon needsactionRecordingAcknowledgement: true, the workforce notice;network.egressMode: "allow_all"needs a non-blanknetwork.egressAcknowledgement.network.locked: trueis accepted and changes nothing;network.locked: falseis refused with 400invalid_requestnamingnetwork.locked, and nothing in that request is written. An unknown group refuses the whole request before anything is written. Answers the resource asGETdoes.
curl -sS "$BOTSEON_API_URL/api/v1/bot-settings" \
-H "authorization: Bearer $BOTSEON_API_KEY" \
-H "accept: application/json"
Team rules
GET /api/v1/bot-settings/rules—limit(1–200, default 50) andcursor, newest first;nextCursorisnullon the last page. Each rule:id,body,surfaces(chat,computer,routines,channels),enabled,createdAt,updatedAt.POST /api/v1/bot-settings/rules— body{ "body": "Answer in British English.", "surfaces": ["chat"] }(1–500 characters), optionallyenabled(on by default). Needs anIdempotency-Key. An organisation keeps at most 20 rules.PATCH /api/v1/bot-settings/rules/{id}— any ofbody,surfacesandenabled.DELETE /api/v1/bot-settings/rules/{id}—204; the rule no longer reaches any run.
An id that is not a live rule of this organisation is 404.
Setup manifests
GET /api/v1/bot-settings/setup-manifests—approved, the manifest every member's computer runs, andproposed, the change waiting for a second administrator (nullwhen there is none).POST /api/v1/bot-settings/setup-manifests— propose a whole manifest,{ "manifest": { "manifestId": "…", "entries": [ … ] } }. Needs anIdempotency-Key.PUT /api/v1/bot-settings/setup-manifests/{id}— create or replace one entry by its id, the script's name (lowercase letters and digits joined by hyphens, up to 64 characters); the rest of the approved manifest is kept. Body{ "setup": "…", "check": "…" }:setupup to 32 KB;check, optional, up to 4 KB — when it exits 0,setupis skipped. A script that carries a secret is refused.DELETE /api/v1/bot-settings/setup-manifests/{id}— remove one entry by its id; an id the approved manifest does not hold is404.POST /api/v1/bot-settings/setup-manifests/{id}/decision—{id}is the proposal's id; body{ "decision": "approved" }or"rejected". The administrator who proposed a change may withdraw it but not approve it.
PUT and DELETE answer 202 with the proposal. Once a second administrator approves it, every member's computer runs it at its next start. One change waits at a time.
Computer operations
POST /api/v1/organisation/computer-operations—{ "action": "stop", "memberUserIds": [ … ] };actionisstop(power down, keep everything),recreate,terminate(end the machine, keep its disk) ordelete. Needs anIdempotency-Key; answers202with the operation. One operation runs per organisation at a time.memberUserIdstakes 1 to 5 000 member ids.recreateandterminateneed the Enterprise plan or its trial (403otherwise).GET /api/v1/organisation/computer-operations/{id}— the operation'sstate, its fivecountsand each member's result.GET /api/v1/organisation/computer-operations/latest— the newest operation, live or finished, the one Organisation → Computers shows when it is reopened;404when the organisation has never run one.
Response
GET /api/v1/bot-settings:
{
"enabled": true,
"capabilities": {
"mcpServersOnComputer": false,
"codingAgentDelegation": true,
"templateSharing": "team",
"actionRecording": false,
"localExecutionCeiling": "ask_every_time"
},
"autoReview": { "enforcedForTeamBots": true },
"access": { "mode": "groups", "groupIds": ["6f1e2d3c-4b5a-4968-8776-655443322110"] },
"network": { "egressMode": "network_settings_only", "allowlist": ["registry.npmjs.org"], "locked": true },
"directoryGroups": [],
"approvalReview": {
"enforced": true,
"allow": ["Reading files in the repository"],
"block": ["Sending email outside the company"]
}
}
Mapping from the source product's admin API
| The source product | Botseon |
|---|---|
| Turn bots on or off for the team | PATCH /bot-settings enabled |
| Capabilities: template sharing | capabilities.templateSharing |
| Capabilities: action recording | capabilities.actionRecording (with capabilities.actionRecordingAcknowledgement) |
| Capabilities: local execution ceiling | capabilities.localExecutionCeiling |
| Capabilities: delegation to coding tools | capabilities.codingAgentDelegation |
| Auto review: enforce, allow and block instructions | approvalReview.enforced, approvalReview.allow, approvalReview.block |
| Access: everyone or chosen groups | access.mode, access.groupIds |
| Network policy: mode, allowlist, allow-all acknowledgement | network.egressMode, network.allowlist, network.egressAcknowledgement |
Network policy locked | network.locked, always true (a write of false is a 400) |
| Team rules: list, create, update, delete | GET/POST /bot-settings/rules (paged by limit and cursor), PATCH/DELETE /bot-settings/rules/{id} |
| Setup manifests: list, put by name, delete by name | GET /bot-settings/setup-manifests, PUT/DELETE /bot-settings/setup-manifests/{id}, approved through POST /bot-settings/setup-manifests/{id}/decision |
| Bot computer operations: create (stop, recreate) | POST /organisation/computer-operations with action stop or recreate (also terminate, delete) |
| Bot computer operations: read one | GET /organisation/computer-operations/{id} |
| Bot computer operations: latest | GET /organisation/computer-operations/latest |
| Team secrets | Dashboard only, as in the source product |
Errors
| Status | Code | When | What to do |
|---|---|---|---|
| 400 | invalid_request | A malformed body, an empty patch, action recording without the acknowledgement, allow_all without one, a 21st instruction of a kind, an unknown group, a destination that is not a host, a rule over 500 characters, an entry id that is not a slug, a script with a secret in it. | Read details. |
| 401 | unauthenticated | The key is missing or refused, a read or write key on an administrator's call, or an admin key whose creator is no longer an admin. | Use an admin key from a current admin. |
| 403 | forbidden | The caller is not an administrator of the organisation, or a recreate or terminate operation without the Enterprise plan. | Ask an administrator. |
| 429 | quota_exceeded | A 21st team rule. | Delete a rule first. |
| 404 | not_found | No such rule, manifest entry, proposal or operation; no operation yet for latest. | List first. |
| 409 | conflict | Template sharing, group access or enforced review on a personal organisation; a setup change while another waits; approving your own change; another computer operation running; turning bots on before an administrator has accepted the bot Terms in the dashboard setup. | Decide the waiting change, or wait for the running operation. |
Rate limits
The same buckets as every other route. See Envelopes, errors, idempotency and paging.
Last verified against build b24557a.