Bots endpoints
Connect and manage the Telegram bots that greet subscribers and track joins in your chats.
List bots
GET /api/bots/list.json
Returns all bots connected to your account, including soft-deleted ones.
{
"status": "ok",
"data": [
{
"id": 7,
"tg": 7123456789,
"username": "mytrackbot",
"name": "My Tracking Bot",
"status": 0,
"created": "2026-05-01 12:00:00"
}
]
}status | Meaning |
|---|---|
0 | Active |
1 | Warning — the bot has lost admin rights in one or more chats |
3 | Deleted (soft) |
Connect a bot
POST /api/bots/add.json
Connects a bot by its BotFather token. Validates the token against the Telegram API, then registers a webhook so the bot can receive updates.
| Parameter | Description |
|---|---|
token | Bot token from @BotFather, e.g. 1234567890:AABBCCdd… |
{
"status": "ok",
"data": {
"id": 7,
"username": "mytrackbot",
"name": "My Tracking Bot"
}
}Restore on re-add: if you previously disconnected this bot and add the same token again, the existing record is reactivated — no duplicate is created and the bot’s campaigns are preserved.
| Error | Meaning |
|---|---|
token | The token is invalid or Telegram rejected it |
exists | This token is already connected to a different account |
webhook | Token is valid but webhook registration failed |
List admin chats
GET /api/bots/chats.json
Returns cached chats where the bot is an admin, excluding any chat already tracked by a campaign. This is the picker used when creating a campaign.
| Parameter | Description |
|---|---|
id | Bot id |
{
"status": "ok",
"data": [
{ "id": -1001234567890, "title": "My Channel", "type": "channel" }
]
}The list is a cache populated when the bot is promoted to admin in a chat. If a chat you expect is missing, confirm the bot is actually an admin of that chat and retry.
Disconnect a bot
POST /api/bots/del.json
Soft-deletes the bot, drops its webhook, and clears caches. The row is kept for history; all leads and stats referencing this bot are preserved. You can reconnect the bot later — the “Restore on re-add” behaviour applies.
| Parameter | Description |
|---|---|
id | Bot id |
{ "status": "ok" }