Skip to main content

Telegram API

Telegram is a bring-your-own-bot channel. You onboard in two stages: first verify a chat against Orbit’s shared sandbox bot so you can preview the experience, then connect your own bot — created with @BotFather — for production traffic. This surface manages that lifecycle and exposes the unified channel state your dashboard renders. Base path: /api/v1/telegram Authentication: API key (X-API-Key) or session JWT. Write endpoints additionally require the owner, admin, or developer role.

Channel state

Returns the current connection mode and the blocks the dashboard needs to render the right card. The mode field drives everything else in the response. mode is one of:
In test_active mode the response carries verified_account plus the daily_test_sends / daily_test_limit counters that back the sandbox send meter (the shared bot is capped at 100 sends/day). In verifying mode it carries verify_token.

Sandbox verification

Before connecting your own bot you can verify a chat against Orbit’s shared sandbox bot. start-verify mints a single-use linking token and a deep link; the dashboard renders the deep link as a QR code. Open the link in Telegram and send /start to complete verification.
test/send is mode-aware. In test_active mode it delivers through the shared sandbox bot to your verified chat; in production mode it delivers through your own connected bot. The request body is the same in both cases:
text is 1–1024 characters. If no chat has been verified yet, test/send returns 409 TELEGRAM_CHANNEL_NOT_CONNECTED. test/disconnect clears verified sandbox chats and returns the resulting state. It accepts an optional reason:

Production bot

Connect your own bot for production traffic by pasting its token from @BotFather. Orbit encrypts the token before persistence, registers the webhook, and reads back the bot’s identity.
bot_token is the 20–120 character token issued by @BotFather. Disconnecting removes the webhook and soft-deletes the stored credentials:

Demo content

Returns a static demo pack the dashboard uses to preview the channel before a bot is connected.

Cost analytics

Returns an estimated cost rollup for your outbound Telegram messages over a time window you choose, broken down by tier. Sending on Telegram is free today, so totals return $0.00 — use this endpoint to track your Telegram send volume alongside the cost reports for your other channels. The days query parameter controls the rollup window:
The response breaks down costs by tier:
  • free: Production Telegram messages sent through your connected bot (currently $0.00)
  • test: Messages sent in test mode through the sandbox bot, counted separately from production (currently $0.00)

See also

  • Verify API — Telegram is also available as a one-time-passcode delivery channel
  • Messaging API — send production Telegram messages once a bot is connected