Skip to main content
GET
/
users
/
{userId}
/
analytics
cURL
curl --request GET \
  --url https://www.greenflash.ai/api/v1/users/{userId}/analytics \
  --header 'Authorization: Bearer <token>'
{
  "averageUserSentiment": {
    "label": "neutral",
    "score": 0.05
  },
  "averageChangeInUserSentiment": {
    "label": "improving",
    "score": 0.12
  },
  "averageFrustration": {
    "label": "moderate",
    "score": 0.38
  },
  "averageStruggle": {
    "label": "low",
    "score": 0.2
  },
  "averageCommercialIntent": {
    "label": "low",
    "score": 0.15
  },
  "averageConversationRating": 4.2,
  "averageConversationQualityIndex": 6.8,
  "topics": [
    {
      "name": "billing",
      "count": 15
    },
    {
      "name": "account access",
      "count": 12
    },
    {
      "name": "feature questions",
      "count": 8
    }
  ],
  "keywords": [
    {
      "name": "refund",
      "count": 9
    },
    {
      "name": "login",
      "count": 7
    }
  ],
  "summary": {
    "profileSummary": "Engaged user who frequently asks about billing and account access.",
    "behavioralPatterns": [
      {
        "pattern": "Returns to ask follow-up questions within 24 hours",
        "evidence": "Across 12 conversations, started a new thread the day after resolving the prior one.",
        "frequency": "recurring"
      }
    ],
    "engagement": {
      "level": "regular",
      "trajectory": "stable",
      "description": "Consistent weekly usage with steady conversation volume over the last 30 days."
    },
    "signals": [
      {
        "type": "insight",
        "title": "Billing questions dominate",
        "description": "Roughly a third of conversations involve billing, suggesting unclear pricing surfaces.",
        "priority": "medium"
      }
    ],
    "productAlignment": {
      "summary": "Uses core support flows but rarely engages with self-serve documentation.",
      "strengths": [
        "Quick to adopt new chat features"
      ],
      "gaps": [
        "Does not discover the in-app billing FAQ"
      ]
    },
    "methodology": "Generated from 47 conversations spanning the last 90 days."
  },
  "totalConversations": 47
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

userId
string<uuid>
required

The user ID to get analytics for

Query Parameters

mode
enum<string>
default:insights

Analysis mode: "simple" returns only numeric aggregates (no rate limiting), "insights" includes topics, keywords, and recommendations (rate limited per tenant plan).

Available options:
simple,
insights
productId
string<uuid>

Filter analytics by product ID.

versionId
string<uuid>

Filter analytics by version ID.

Response

User analytics retrieved

averageUserSentiment
object
required

Average sentiment across all conversations.

averageChangeInUserSentiment
object
required

Distribution of sentiment changes.

averageFrustration
object
required

Average frustration level.

averageStruggle
object
required

Average struggle level.

averageCommercialIntent
object
required

Average commercial intent.

averageConversationRating
number | null
required

Average conversation rating.

averageConversationQualityIndex
number | null
required

Average conversation quality index.

summary
object
required

Structured participant profile summary.

totalConversations
number
required

Total number of conversations analyzed.

topics
object[]

Topics discussed (insights mode only).

keywords
object[]

Keywords extracted (insights mode only).