EnglishUser APILeads, journal & stats

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.

CodeNameMeaning
0waitSubscriber opened the bot link but hasn’t joined the chat yet
1holdSubmitted a join request, awaiting admin approval
2approveJoined the chat (or their join request was approved)
3cancelLeft the chat voluntarily
4trashKicked 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.

ParameterDescription
campaignFilter by campaign id
statusFilter by lead status code (0–4)
fromStart of date range (Unix timestamp)
toEnd of date range (Unix timestamp)
limitPage size (default 50, max 200)
offsetPagination 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.

ParameterRequiredDescription
botBot id
chatChat id (Telegram)
actionFilter by action type (see table below)
fromStart of date range (Unix timestamp)
toEnd of date range (Unix timestamp)
limitPage size (default 50, max 200)
offsetPagination offset
{
  "status": "ok",
  "data": [
    {
      "id": 5001,
      "subscriber": 9876543210,
      "username": "alice",
      "action": "join",
      "paid": 1,
      "time": "2026-05-20 10:01:00"
    }
  ],
  "total": 1
}
actionMeaning
joinSubscriber joined the chat
leaveSubscriber left the chat voluntarily
banSubscriber was kicked or banned
requestSubscriber submitted a join request
approveA 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.

ParameterDescription
campaignFilter to a single campaign (omit for account-wide totals)
fromStart of date range (Unix timestamp)
toEnd 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.

ParameterDescription
campaignFilter to a single campaign
fromStart of date range (Unix timestamp)
toEnd 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.