Autopilot
25 endpoints at https://api.kosa8.com, sent with Authorization: Bearer $KOSA8_API_KEY. Generated from the API's own OpenAPI description, which a test holds to the router.
Autopilot's triggers, typed actions and tiers#
/v1/bots/catalogpublicPublic.
Responsescurl -s -X GET https://api.kosa8.com/v1/bots/catalog
Bot templates, ranked for this organization#
/v1/bot-templatesscope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/bot-templates \ -H "Authorization: Bearer $KOSA8_API_KEY"
One bot template#
/v1/bot-templates/{id}scope sandboxes:readidrequiredpath · stringcurl -s -X GET https://api.kosa8.com/v1/bot-templates/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY"
Compile a bot without saving it: the plan, and with replay the last 7 days#
/v1/bots/planscope sandboxes:readtemplatestringspecobjectspec.triggersrequiredarray of objectspec.actionsrequiredarray of objectspec.scopeobjectspec.budget_usdnumberspec.notifyobjectspec.dedup_sintegerspec.rate_per_hourintegerspec.chainbooleannamestringscopeobjectbudget_usdnumbernotifyobjectreplaybooleancurl -s -X POST https://api.kosa8.com/v1/bots/plan \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Turn one sentence into a bot spec (never saved, never on)#
/v1/bots/compilescope sandboxes:readThrough kosa8's AI gateway, included at no charge, with a rules fallback; a person always sees the plan before a bot turns on.
JSON bodytextrequiredstringcurl -s -X POST https://api.kosa8.com/v1/bots/compile \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Pause every bot in the organization#
/v1/bots/pause-allscope adminRunning work is left alone. Any admin credential, an agent's too.
Responsescurl -s -X POST https://api.kosa8.com/v1/bots/pause-all \ -H "Authorization: Bearer $KOSA8_API_KEY"
Resume every bot#
/v1/bots/resume-allscope adminNeeds a person: a dashboard session or an API key made for a member. Capability tokens, MCP sessions, org keys bound to no member and bots get 403 human_required.
Responsescurl -s -X POST https://api.kosa8.com/v1/bots/resume-all \ -H "Authorization: Bearer $KOSA8_API_KEY"
The organization's bots#
/v1/botsscope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/bots \ -H "Authorization: Bearer $KOSA8_API_KEY"
Create a bot (always a draft)#
/v1/botsscope sandboxes:writetemplatestringspecobjectspec.triggersrequiredarray of objectspec.actionsrequiredarray of objectspec.scopeobjectspec.budget_usdnumberspec.notifyobjectspec.dedup_sintegerspec.rate_per_hourintegerspec.chainbooleannamestringscopeobjectbudget_usdnumbernotifyobjectsponsorstringcurl -s -X POST https://api.kosa8.com/v1/bots \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
One bot, with its spec and plan#
/v1/bots/{id}scope sandboxes:readidrequiredpath · stringcurl -s -X GET https://api.kosa8.com/v1/bots/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY"
Change a bot; a new spec is a new version#
/v1/bots/{id}scope sandboxes:writeA spec changed by no person turns an enabled bot back into a draft.
Parametersidrequiredpath · stringnamestringspecobjectspec.triggersrequiredarray of objectspec.actionsrequiredarray of objectspec.scopeobjectspec.budget_usdnumberspec.notifyobjectspec.dedup_sintegerspec.rate_per_hourintegerspec.chainbooleansponsorstringbudget_usdnumberscopeobjectnotifyobjectcurl -s -X PATCH https://api.kosa8.com/v1/bots/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Delete a bot (its runs stay)#
/v1/bots/{id}scope sandboxes:writeidrequiredpath · stringcurl -s -X DELETE https://api.kosa8.com/v1/bots/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY"
Turn a bot on#
/v1/bots/{id}/enablescope sandboxes:writeNeeds a person: a dashboard session or an API key made for a member. Capability tokens, MCP sessions, org keys bound to no member and bots get 403 human_required.
Parametersidrequiredpath · stringcurl -s -X POST https://api.kosa8.com/v1/bots/$SBX/enable \ -H "Authorization: Bearer $KOSA8_API_KEY"
Turn a bot off#
/v1/bots/{id}/disablescope sandboxes:writeidrequiredpath · stringcurl -s -X POST https://api.kosa8.com/v1/bots/$SBX/disable \ -H "Authorization: Bearer $KOSA8_API_KEY"
Run a bot now, or a dry run with a replay of the last 7 days#
/v1/bots/{id}/runsscope sandboxes:writeA dry run changes nothing and is never billed.
Parametersidrequiredpath · stringdry_runbooleancurl -s -X POST https://api.kosa8.com/v1/bots/$SBX/runs \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
A bot's runs, newest first#
/v1/bots/{id}/runsscope sandboxes:readidrequiredpath · stringlimitquery · integercurl -s -X GET https://api.kosa8.com/v1/bots/$SBX/runs \ -H "Authorization: Bearer $KOSA8_API_KEY"
One run and its steps#
/v1/bot-runs/{id}scope sandboxes:readidrequiredpath · stringcurl -s -X GET https://api.kosa8.com/v1/bot-runs/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY"
Cancel a run (its pending approvals are rejected)#
/v1/bot-runs/{id}/cancelscope sandboxes:writeidrequiredpath · stringcurl -s -X POST https://api.kosa8.com/v1/bot-runs/$SBX/cancel \ -H "Authorization: Bearer $KOSA8_API_KEY"
Undo a step (wake, unblock its own block, lift its own refusal)#
/v1/bot-runs/{id}/steps/{key}/undoscope sandboxes:writeidrequiredpath · stringkeyrequiredpath · stringcurl -s -X POST https://api.kosa8.com/v1/bot-runs/$SBX/steps/$KEY/undo \ -H "Authorization: Bearer $KOSA8_API_KEY"
Bot steps waiting for a person, and decided ones#
/v1/approvalsscope sandboxes:readstatequery · "pending" | "decided" | "all"limitquery · integercurl -s -X GET https://api.kosa8.com/v1/approvals \ -H "Authorization: Bearer $KOSA8_API_KEY"
One approval with its raw arguments#
/v1/approvals/{id}scope sandboxes:readidrequiredpath · stringcurl -s -X GET https://api.kosa8.com/v1/approvals/$SBX \ -H "Authorization: Bearer $KOSA8_API_KEY"
Approve or reject a bot's step#
/v1/approvals/{id}/decidescope sandboxes:readNeeds a person: a dashboard session or an API key made for a member. Capability tokens, MCP sessions, org keys bound to no member and bots get 403 human_required. The person's role must cover the action (admin for billing, unblocking and freezing).
Parametersidrequiredpath · stringdecisionrequired"approve" | "reject"reasonstringedited_argsobjectcurl -s -X POST https://api.kosa8.com/v1/approvals/$SBX/decide \ -H "Authorization: Bearer $KOSA8_API_KEY" \ -H 'Content-Type: application/json' -d @body.json
Two-way channels: Slack (interactive approvals) and GitHub#
/v1/connectionsscope sandboxes:readcurl -s -X GET https://api.kosa8.com/v1/connections \ -H "Authorization: Bearer $KOSA8_API_KEY"
Start connecting the kosa8 Slack app#
/v1/connections/slack/installscope adminPost-only: it never reads channel history.
Responsescurl -s -X POST https://api.kosa8.com/v1/connections/slack/install \ -H "Authorization: Bearer $KOSA8_API_KEY"
Disconnect the kosa8 Slack app#
/v1/connections/slackscope admincurl -s -X DELETE https://api.kosa8.com/v1/connections/slack \ -H "Authorization: Bearer $KOSA8_API_KEY"