Insights · Developer account

getBotUsage

Usage statistics for a bot

This method authenticates with your developer account. The easiest way to call it is the dashboard, which signs the request for you. Direct calls need a dashboard session cookie.

Owner-scoped usage aggregates over the last N days (both envs, all threads). Days with no activity are zero-filled; the days array is sorted ascending by date.

Request

curl https://api.sprintelex.com/getBotUsage \
  # authenticated with your dashboard session \
  -H "Content-Type: application/json" \
  -d '{"bot_id":"<bot-id>"}'

Parameters

NameTypeRequiredRules
bot_idstringYes-
daysintegerNo (default 30)clamped to 1-90

Response

{ ok: true, result: { days: [ { date ('YYYY-MM-DD'), messages, user_messages, updates } ], totals: { messages, updates, webhook_delivered } } }

Rate limit: none in code

Errors

StatusErrorWhen
400bot_id is requiredmissing bot_id
404bot not foundno such bot, not owned by caller, or deleted