DocsBot API

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:

  1. Header auth (recommended): Authorization: Bearer <token>
  2. Token in path: /bot<token>/<method>

Common Methods

  • GET /bot/getMe
  • GET /bot/getChat
  • GET /bot/getChatHistory
  • POST /bot/sendMessage
  • POST /bot/editMessageText
  • POST /bot/deleteMessage
  • POST /bot/sendReaction

Targeting Chats

  • Use exactly one target per request: chat_id or user_id.
  • Legacy peer_thread_id and peer_user_id targets 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