API pipeline: Connect your Telegram bot as an oracle

Index: API pipelines — index

Goal: your own Telegram bot (made with @BotFather) answers people under an agenda you choose. Cabi.Chat hosts it: no server of yours is needed, and its conversations land in your inbox.

Steps

1. Create.

POST /v0/my/oracles
Idempotency-Key: oracle-shopbot-1
{"kind": "telegram_bot", "title": "Shop bot", "bot_token": "123456789:AAE…",
 "agenda": "<agenda nonce>", "project": "<project nonce>"}
→ {"nonce": "470000000000000002", "card_type": "oracle", "kind": "telegram_bot", "status": "STOPPED", …}

2. Start.

POST /v0/my/oracles/470000000000000002/start
→ {"success": true, "status": "ACTIVE"}

3. Talk. People who open your bot in Telegram and write to it get answers under the agenda. Each person is one room: GET /v0/my/rooms. Supervise them: API pipeline: Supervise conversations your oracles hold: turn the listener off/on, clear a handoff, set a room's agenda, ask the oracle to continue

4. Stop or delete. POST …/stop → {"success": true, "status": "STOPPED"}; DELETE /v0/my/oracles/{nonce} stops the bot and removes its stored token.

Behind

Rules

API surface

Endpoint Purpose FE AI / oracle
POST /v0/my/oracles Create the bot oracle yes yes
PATCH /v0/my/oracles/{nonce} Agenda, project, title yes yes
POST /v0/my/oracles/{nonce}/start, /stop Run / stop yes yes
GET /v0/my/rooms The bot's conversations yes yes
DELETE /v0/my/oracles/{nonce} Stop and delete yes rarely

Mentioned