Get Sentiment Analysis

Returns conversation sentiment distribution (positive, negative, neutral, unknown) for your project.

Returns conversation sentiment distribution (positive, negative, neutral, unknown) for your project.

POST
/getSentimentAnalysis

Authorization

bearerToken

AuthorizationBearer <token>

API token for YourGPT Public APIs. Create tokens in Settings > API Tokens in your YourGPT dashboard.

In: header

Request Body

application/json

project_uid*string

Project unique identifier.

from?string

Start date. Accepts YYYY-MM-DD, YYYY-MM-DD HH:mm:ss, or ISO format.

to?string

End date.

Response Body

application/json

curl -X POST "https://api.yourgpt.ai/chatbot/v1/getSentimentAnalysis" \  -H "Content-Type: application/json" \  -d '{    "project_uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"  }'
{
  "type": "RXSUCCESS",
  "message": "Session detail",
  "data": [
    {
      "sentiment": "positive",
      "session_count": 275
    }
  ]
}