The Only API docs
Integrations

Start Telegram pairing

Begin (or restart) pairing and get a t.me deep link. Open the link, and the chat that the bot lands in becomes the panel's channel.

POST
/integrations/telegram/pair

Begin (or restart) pairing and get a t.me deep link. Open the link, and the chat that the bot lands in becomes the panel's channel.

Two modes:

  • bot_mode: "shared" — use our bot. Nothing else to supply. Returns 409 if this deployment has no shared bot configured, rather than handing back a link that can never resolve.
  • bot_mode: "custom" — use your own bot, passing its bot_token. We verify the token with Telegram before storing it, encrypt it at rest, and clear any existing webhook on that bot (otherwise our polling would conflict with it and the deep link would silently never resolve).

The response carries the deep link and its expiry, never a token. Calling this again replaces any pending code.

Guide: Integrations

X-API-Key<token>

Your CRM panel API key

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/integrations/telegram/pair" \  -H "Content-Type: application/json" \  -d '{}'
{  "bot_username": null,  "deep_link": null,  "expires_at": null,  "integration": {    "bot_mode": null,    "bot_username": null,    "chat_id": null,    "chat_title": null,    "chat_type": null,    "consecutive_failures": null,    "created_at": "string",    "event_types": null,    "has_custom_token": true,    "is_active": true,    "is_paired": true,    "last_delivery_at": null,    "last_error": null,    "paired_at": null,    "updated_at": "string"  },  "success": true,  "ttl_seconds": null}