Sentiment API Documentation


Introduction


IrisAgent's AI Sentiment Analysis can be used an API to get AI-powered sentiment corresponding to any conversation. The value of sentiment score varies between -100 and 100. A score of -100 indicates a very negative sentiment, 0 indicates a neutral sentiment, and 100 indicates a very positive sentiment.

API Guide


Below is a curl command to call our API:

curl -X POST --location "https://api1.irisagent.com/v1/sentiment" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer Replace_me_business_id" \
    -H "X-Language-Iso-Code: en" \
    -d '{
          "conversationId": "12345",
          "message": "Customer: Application will not access Flight Log
When clicking on "Flight Log" the application keeps producing an ERROR message and will not allow access or Flight Log updating. Please help to fix this ASAP.
------------------

Agent: Thank you for the information. I have forwarded this issue with all the details to our engineering team for further investigation. I will let you know as soon as any new information becomes available.
John Doe | Technical Support Specialist O: _ • TF: _
Acme Systems International, Inc. 

Agent: Billy - Please let the customer know that this issue has been fixed.


Agent: I've updated and closed this issue as resolved. While I'm confident we've addressed your issues, if you have any other questions, comments or concerns feel free to create a new ticket. I'm here to help.
"Please do NOT reply to this email unless you would like us to reopen it. Thank you"
John Doe | Technical Support Specialist O: _ • TF: _
Acme Systems International, Inc."
        }'
          

The API inputs are as follows,

FieldDescription
conversationId[Required] Unique ticket or chat id
message[Required] Support conversation that needs AI-powered sentiment analysis.
Replace_me_business_idThis is the ID provided by the IrisAgent team
X-Language-Iso-Code[Optional] This optional header allows you to specify the desired language for IrisGPT's responses. If not provided, automatic language detection will be used


A sample output of the API:

{
  "sentiment": -40
}


A sample output of the API when no sentiment was generated:

{}

© Copyright Iris Agent Inc.All Rights Reserved