Skip to main content
GET
/
products
/
{productId}
/
analytics
cURL
curl --request GET \
  --url https://www.greenflash.ai/api/v1/products/{productId}/analytics \
  --header 'Authorization: Bearer <token>'
{
  "averageUserSentiment": {
    "label": "neutral",
    "score": 0.12
  },
  "averageChangeInUserSentiment": {
    "label": "slightly negative",
    "score": -0.08
  },
  "averageFrustration": {
    "label": "low",
    "score": 0.22
  },
  "averageStruggle": {
    "label": "low",
    "score": 0.18
  },
  "averageCommercialIntent": {
    "label": "moderate",
    "score": 0.45
  },
  "productQualityIndex": 7.4,
  "pillarScores": {
    "satisfaction": 0.78,
    "growth": 0.62,
    "friction": 0.85,
    "safety": 0.91
  },
  "topics": [
    {
      "name": "billing",
      "count": 340
    },
    {
      "name": "account access",
      "count": 215
    },
    {
      "name": "refund policy",
      "count": 178
    }
  ],
  "topicGroups": [
    {
      "name": "Account & Billing",
      "count": 555
    },
    {
      "name": "Product Usage",
      "count": 312
    }
  ],
  "keywords": [
    "subscription",
    "refund",
    "password reset",
    "pricing",
    "upgrade"
  ],
  "insights": null,
  "hallucinationCount": {
    "total": 12,
    "percentage": 1.2
  },
  "jailbreakCount": {
    "total": 3,
    "percentage": 0.3
  },
  "userBiasCount": {
    "total": 0,
    "percentage": 0
  },
  "modelBiasCount": {
    "total": 2,
    "percentage": 0.2
  },
  "userToxicityCount": {
    "total": 5,
    "percentage": 0.5
  },
  "modelToxicityCount": {
    "total": 0,
    "percentage": 0
  },
  "rootCauseMix": [
    {
      "cause": "Outdated knowledge base",
      "count": 45,
      "avgConfidence": 0.82,
      "source": "root_cause_analysis"
    },
    {
      "cause": "Ambiguous user query",
      "count": 31,
      "avgConfidence": 0.74,
      "source": "root_cause_analysis"
    }
  ],
  "topFailingTools": [
    {
      "toolName": "search_knowledge_base",
      "failureCount": 18,
      "totalCalls": 520,
      "failureRate": 0.035
    }
  ],
  "dissatisfactionThemes": [
    {
      "topicCanonical": "refund_delays",
      "topicGroup": "Account & Billing",
      "count": 28,
      "avgFrustration": 0.72,
      "avgStruggle": 0.55,
      "avgCqi": 3.8
    }
  ],
  "averageConversationRating": 4.1,
  "ratingCount": 650
}

Authorizations

Authorization
string
header
required

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

Path Parameters

productId
string<uuid>
required

The product ID to get analytics for

Response

Product analytics retrieved successfully

averageUserSentiment
object
required

Average user sentiment across conversations.

averageChangeInUserSentiment
object
required

Average change in user sentiment during conversations.

averageFrustration
object
required

Average frustration level detected.

averageStruggle
object
required

Average struggle level detected.

averageCommercialIntent
object
required

Average commercial intent detected.

productQualityIndex
number | null
required

Product Quality Index score.

pillarScores
object
required

Quality pillar scores.

topics
object[]
required

Top topics discussed.

topicGroups
object[]
required

Topic group aggregations.

keywords
string[]
required

Extracted keywords.

hallucinationCount
object
required

Hallucination detection counts.

jailbreakCount
object
required

Jailbreak attempt counts.

userBiasCount
object
required

User bias detection counts.

modelBiasCount
object
required

Model bias detection counts.

userToxicityCount
object
required

User toxicity detection counts.

modelToxicityCount
object
required

Model toxicity detection counts.

rootCauseMix
object[]
required

Root cause breakdown.

topFailingTools
object[]
required

Top failing tools by failure rate.

dissatisfactionThemes
object[]
required

Dissatisfaction themes by topic.

averageConversationRating
number | null
required

Average conversation rating.

ratingCount
number
required

Number of conversations with a rating.

insights
any

AI-generated insights.