Integrations
DonutChat exposes three integration surfaces. Pick the one that matches the direction of traffic and whether you need a bot identity.
Which integration fits?
Section titled “Which integration fits?”| Incoming Webhook | Bot Send | Bot Receive | |
|---|---|---|---|
| Direction | External → chat | Bot → chat | Chat → bot |
| Auth | Token in URL path | Authorization: Bearer | Authorization: Bearer (or ?token=) |
| Transport | HTTPS POST | HTTPS POST | WebSocket over HTTPS |
| Identity | None (anonymous webhook) | Bot name + avatar | — |
| Latency | <200 ms | <200 ms | Real-time push |
| Pick this when | You need the simplest “post into chat X” path for alerts/CI/cron | You need a reusable bot identity across multiple chats | Your bot needs to read messages and react |
Incoming Webhooks and Bot Send both post into a chat. Bot Receive is the only integration that streams events from chats.
30-second quickstart
Section titled “30-second quickstart”Incoming Webhook
Section titled “Incoming Webhook”curl -X POST \ "https://api.donutchat.com/webhooks/v1/1234/YOUR_WEBHOOK_TOKEN" \ -H "Content-Type: application/json" \ -d '{"content": "Hello from curl"}'Full details: Incoming Webhooks.
Bot Send
Section titled “Bot Send”curl -X POST \ "https://api.donutchat.com/bots/v1/messages" \ -H "Authorization: Bearer vifbot_YOUR_TOKEN_HERE" \ -H "Content-Type: application/json" \ -d '{"chat_id": 1234, "content": "Hello from the bot"}'Full details: Bot Send.
Bot Receive
Section titled “Bot Receive”websocat \ -H "Authorization: Bearer vifbot_YOUR_TOKEN_HERE" \ wss://api.donutchat.com/bots/v1/streamFull details: Bot Receive.