Bot API
Inline Bot API is a simple HTTP API for bot integrations. It is intended for simpler bot workflows and alerts.
Compatibility
Bot API endpoints may evolve. Pin generated types and review the changelog when upgrading.
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. - Legacy
peer_thread_idandpeer_user_idtargets are also 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
Terminal
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:
JSON
{ "ok": true, "result": {} }Error:
JSON
{ "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