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
| Name | Type | Required | Rules |
|---|---|---|---|
| bot_id | string | Yes | - |
| days | integer | No (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
| Status | Error | When |
|---|---|---|
| 400 | bot_id is required | missing bot_id |
| 404 | bot not found | no such bot, not owned by caller, or deleted |