Analytics Summary
GET
/api/v1/analyticsReturns aggregated metrics — message counts, session counts, and lead counts — for the bot over a given time range.
Required scope: read
Query parameters
sincestringqueryISO 8601 datetime string. Only events on or after this timestamp are counted. Defaults to 30 days ago.
Example: 2026-07-01T00:00:00Z
Response
sincestringThe start of the analytics window (ISO 8601).
total_messagesintegerAll messages (user + assistant) in the period.
total_sessionsintegerUnique conversation sessions started.
total_leadsintegerLeads captured by the bot.
Examples
curl "https://api.personaliai.com/api/v1/analytics" \
-H "Authorization: Bearer chatty_sk_your_key"curl "https://api.personaliai.com/api/v1/analytics?since=2026-07-01T00:00:00Z" \
-H "Authorization: Bearer chatty_sk_your_key"200 OK:
{
"since": "2026-06-07T00:00:00Z",
"total_messages": 4821,
"total_sessions": 962,
"total_leads": 147
}Notes
- Counts update in near real-time (typically within a few seconds of each event).
- For daily or hourly breakdowns, use the Usage Stats endpoint which provides per-day granularity.