Skip to main content
Use the analytics resource to fetch overview metrics, conversation trends, genie performance breakdowns, and period-over-period comparisons. Supported actions: all, overview, trends, genie-performance, compare.

Overview

Returns account-level aggregate counts for genies, conversations, leads, and knowledge base documents. all and overview are equivalent.
resource
string
required
Must be "analytics".
action
string
required
"all" or "overview".
data
object

Response

success
boolean
data
object
{
  "resource": "analytics",
  "action": "overview"
}

Returns daily conversation trend data points over a time period.
resource
string
required
Must be "analytics".
action
string
required
Must be "trends".
data
object
curl -X POST https://api.helpgenie.ai/v1/analytics \
  -H "Authorization: Bearer hg_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "action": "trends", "data": { "period": "30d" } }'

Genie performance

Returns conversation volume grouped by genie, filtered by time period. Supports custom date ranges.
resource
string
required
Must be "analytics".
action
string
required
Must be "genie-performance".
data
object
curl -X POST https://api.helpgenie.ai/v1/analytics \
  -H "Authorization: Bearer hg_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "genie-performance",
    "data": { "period": "30d" }
  }'

Compare

Returns a period-over-period conversation comparison (e.g., this week vs last week).
resource
string
required
Must be "analytics".
action
string
required
Must be "compare".
data
object
curl -X POST https://api.helpgenie.ai/v1/analytics \
  -H "Authorization: Bearer hg_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "action": "compare", "data": { "period": "7d" } }'