Leads, journal & statistics endpoints
Export conversions, browse the raw chat activity log, and pull aggregated statistics.
Lead statuses
All filtering and response fields that deal with lead status use numeric codes.
| Code | Name | Meaning |
|---|---|---|
0 | wait | Subscriber opened the bot link but hasn’t joined the chat yet |
1 | hold | Submitted a join request, awaiting admin approval |
2 | approve | Joined the chat (or their join request was approved) |
3 | cancel | Left the chat voluntarily |
4 | trash | Kicked or banned from the chat |
See Lead lifecycle for the full transition rules and details on when postbacks fire.
List leads
GET /api/leads/list.json
Returns leads matching the given filters, newest first.
| Parameter | Description |
|---|---|
campaign | Filter by campaign id |
status | Filter by lead status code (0–4) |
from | Start of date range (Unix timestamp) |
to | End of date range (Unix timestamp) |
limit | Page size (default 50, max 200) |
offset | Pagination offset |
{
"status": "ok",
"data": [
{
"id": 1001,
"campaign": 12,
"subscriber": 9876543210,
"username": "alice",
"click": "abc456xyz",
"status": 2,
"start_time": "2026-05-20 10:00:00",
"join_time": "2026-05-20 10:01:00",
"updated": "2026-05-20 10:01:00"
}
],
"total": 1
}username is an empty string when the subscriber has no Telegram username.
click is an empty string when the subscriber arrived without a click payload
(e.g. opened the bot link directly, not via your deep link).
join_time is "0000-00-00 00:00:00" while the lead is still in wait or hold.
Chat activity journal
GET /api/journal/list.json
Returns every join and leave event recorded in a chat — including organic activity (users who joined without starting the bot). This is the raw source of channel dynamics; organic events do not create leads and do not fire postbacks.
| Parameter | Required | Description |
|---|---|---|
bot | ✓ | Bot id |
chat | ✓ | Chat id (Telegram) |
action | Filter by action type (see table below) | |
from | Start of date range (Unix timestamp) | |
to | End of date range (Unix timestamp) | |
limit | Page size (default 50, max 200) | |
offset | Pagination offset |
{
"status": "ok",
"data": [
{
"id": 5001,
"subscriber": 9876543210,
"username": "alice",
"action": "join",
"paid": 1,
"time": "2026-05-20 10:01:00"
}
],
"total": 1
}action | Meaning |
|---|---|
join | Subscriber joined the chat |
leave | Subscriber left the chat voluntarily |
ban | Subscriber was kicked or banned |
request | Subscriber submitted a join request |
approve | A join request was approved by an admin |
paid is 1 when the event corresponds to a tracked lead (subscriber started
via the bot), and 0 for organic activity.
Summary statistics
GET /api/stats/summary.json
Aggregate counters across all campaigns or a single campaign.
| Parameter | Description |
|---|---|
campaign | Filter to a single campaign (omit for account-wide totals) |
from | Start of date range (Unix timestamp) |
to | End of date range (Unix timestamp) |
{
"status": "ok",
"data": {
"starts": 500,
"holds": 12,
"confirms": 420,
"cancels": 35,
"trashes": 8,
"cr": 84.0,
"organic_joins": 150,
"organic_leaves": 42
}
}cr is the conversion rate: confirms / starts × 100, rounded to one decimal.
organic_joins and organic_leaves count activity not tied to any lead.
Daily time series
GET /api/stats/series.json
Per-day counters for charting. Accepts the same filters as summary.
| Parameter | Description |
|---|---|
campaign | Filter to a single campaign |
from | Start of date range (Unix timestamp) |
to | End of date range (Unix timestamp) |
{
"status": "ok",
"data": [
{ "date": "2026-05-20", "starts": 22, "confirms": 19, "cancels": 2, "trashes": 0, "organic": 8 },
{ "date": "2026-05-21", "starts": 18, "confirms": 15, "cancels": 1, "trashes": 1, "organic": 5 }
]
}Past days are read from pre-aggregated daily rollups. Today’s row is computed live from raw events, so its numbers update in real time throughout the day.