Skip to main content
POST
/
v1
/
sentiment
Gets AI-powered sentiment analysis for a conversation
curl --request POST \
  --url https://api1.irisagent.com/v1/sentiment \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "conversationId": "<string>",
  "message": "<string>"
}
'
{
  "sentiment": 0
}

Authorizations

Authorization
string
header
required

The Authorization header is required to authenticate API requests. It should contain a bearer token obtained through the IrisAgent portal.

Headers

X-Language-Iso-Code
string<iso-639-1>

This optional header allows you to specify the desired language. If not provided, automatic language detection will be used.

Body

application/json
conversationId
string
required

Unique ticket or chat id

message
string
required

Support conversation that needs AI-powered sentiment analysis

Response

The AI-generated sentiment score for the conversation

sentiment
integer | null

AI-generated sentiment score ranging from -100 (very negative) to 100 (very positive)

Required range: -100 <= x <= 100