Bot API
Inline Bot API is a simple HTTP API for bot integrations. It is intended for simpler bot workflows and alerts.
Status
Alpha. Endpoints may change.
Base URL
Authentication
Use either:
- Header auth (recommended):
Authorization: Bearer <token> - Token in path:
/bot<token>/<method>
Common Methods
GET /bot/getMeGET /bot/getChatGET /bot/getChatHistoryPOST /bot/sendMessagePOST /bot/editMessageTextPOST /bot/deleteMessagePOST /bot/sendReaction
Targeting Chats
- Use exactly one target per request:
chat_idoruser_id. - For compatibility in alpha,
peer_thread_idandpeer_user_idare still accepted.
When To Use This API
- Use Bot HTTP API for simpler workflows and alerts.
- For full two-way bot interactions, we recommend the Full Realtime API (
@inline-chat/realtime-sdk).
Quick Example
curl -sS \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-X POST "https://api.inline.chat/bot/sendMessage" \
-d '{"chat_id":42,"text":"hello"}'
Response Format
Success:
{ "ok": true, "result": {} }
Error:
{ "ok": false, "error_code": 400, "description": "Invalid arguments was provided" }
SDK and Reference
- SDK package:
@inline-chat/bot-api - Developers overview
- Realtime API
- API reference UI