Build bots.Ship messaging integrations

Bot APIs for developers: send messages with REST, receive updates via webhooks or long polling, and manage tokens, delivery, and debugging in one console.

REST
Bot API v1
HMAC
Webhook signature
2
Official SDKs
4
Retry tiers
bot.ts
import { StarIMBot } from '@starim-io/bot-sdk'

const bot = new StarIMBot(process.env.BOT_TOKEN!)

bot.on('message', async (ctx) => {
  await ctx.reply(`Received: ${ctx.message.text}`)
})

await bot.setWebhook({
  url: 'https://api.example.com/bot/webhook',
})
// Or bot.startPolling({ timeoutSec: 25 })

Create a bot in the console and copy the token. Verify webhook signatures with the X-StarIM-Signature header (HMAC-SHA256).

What you can build

Clear responsibilities across docs, APIs, SDKs, and the console make integrations predictable.

Send and receive messages

Text, images, files, rich messages, and media groups—one API for DMs and group chats.

Webhooks and long polling

Push updates via setWebhook or pull via getUpdates. Updates are deduplicated by update_id with automatic retries.

Interactions and moderation

Inline keyboards, command menus, inline mode, pin/kick actions, chatAction signals, and more.

Observable by default

Review requests, rotate tokens, configure webhooks, inspect delivery logs, and track 24h metrics to debug faster.

Build your first bot in 4 steps

From request to your first message—usually within minutes.

01

Create a bot in the console

Sign in, submit a bot request, and fill in name, purpose, and description.

02

Copy the token

After approval, copy the one-time token (sbot_…) and store it securely.

03

Configure updates delivery

Use setWebhook or startPolling, and set secret_token and allowed_updates.

04

Send your first message

Call sendMessage via REST/SDK and inspect delivery logs and API metrics.

Webhooks and long polling

Receive user messages, button callbacks, and member events with deduplication by update_id and automatic webhook retries.

Webhook (recommended for production)

Receive HTTPS POST callbacks, verify X-StarIM-Signature with HMAC, and optionally restrict by IP allowlists and secret_token.

Long polling getUpdates

Great for local or private-network development. The SDK ships startPolling, and you should choose either polling or webhooks.

Read webhook docs

Common update types

messageedited_messagecallback_queryinline_querymy_chat_memberchat_memberchat_join_requestmessage_readmessage_delivered

Filter subscriptions with allowed_updates , while Privacy Mode controls what the bot can read in group chats.

Node.js and Java

Package authentication, webhook signature verification, and common API calls with end-to-end type safety.

@starim-io/bot-sdk

Node.js
Released v0.1.9

Bot API and webhook handling with full TypeScript types, native fetch, and zero runtime dependencies.

pnpm add @starim-io/bot-sdk

io.starim:bot-sdk

Java
Released v0.1.5

Built for JDK 17+ with HttpClient, optional jdk.httpserver integration, and Jackson serialization.

mvn: io.starim:bot-sdk

Typical integration scenarios

Business alerts, AI copilots, group operations, and workflow automation can all share the same Bot API.

Business alerts

Push orders, approvals, and monitoring alerts into direct messages or group chats.

AI assistants

Forward webhooks to your LLM stack, then support edits, recalls, and inline buttons.

Group automation

Drive operational flows with command menus, chatAction hints, and member lifecycle events.

Workflow integrations

Connect REST and webhooks to enterprise systems, ticketing tools, and CRM platforms.

Create your first bot

Submit a request in the console → configure a webhook or long polling → send your first message with the SDK. Inspect delivery logs when things go wrong.