IrisGPT API Documentation
Introduction
IrisAgent's IrisGPT AI answers can be used an API to power intelligent conversations on any of your frontend webpages. It can search through your internal and external knowledge articles, community forums, product documentation, and other informational content.
API Guide
Below is a curl command to call our IrisGPT API:
curl -X POST --location "https://api1.irisagent.com/v1/irisgpt/ask" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer Replace_me_business_id" \
-H "X-Language-Iso-Code: en" \
-d '{
"conversationId": "12345"
"query": "how do agents use knowledge"
}'
The API inputs are as follows,
Field | Description |
---|---|
conversationId | [Required] Unique ticket id if the input is a ticket or message id if the input is a chat message/comment |
query | [Required] URL-encoded query from the user |
Replace_me_business_id | This is the ID provided by the IrisAgent team |
Chat-Identifier | [Optional] The Chat-Identifier is an optional header in the format of uuid that is used to track the conversation session. If not provided, a new chat session will automatically be created. While not required for single request/response interactions, it is necessary for maintaining continuity in ongoing conversations. |
productId | [Optional] If you have multiple products and knowledge base segmented by products, you can provide the product ID here |
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 when an AI answer is found:
{
"result": {
"htmltext": "Agents can leverage knowledge to help customers by using the Knowledge Capture app. This app allows agents to search the Help Center without leaving the ticket, insert links to relevant Help Center articles in ticket comments, add inline feedback to existing articles, and create new articles while answering tickets using a pre-defined template. This helps agents assist customers effectively while also enhancing self-service options for other customers.\n<br>\nCheck out this article for more information:\n<ul> <li style=\"list-style-position: inside;\"><a href='https://d3v-irisagent.zendesk.com/hc/en-us/articles/360046592594-How-can-agents-leverage-knowledge-to-help-customers' target='_blank'>How can agents leverage knowledge to help customers?</a></li> </ul>",
"links": [
{
"text": "How can agents leverage knowledge to help customers?",
"url": "https://d3v-irisagent.zendesk.com/hc/en-us/articles/360046592594-How-can-agents-leverage-knowledge-to-help-customers"
}
],
"linksTitle": "Check out this article for more information:",
"plaintext": "Agents can leverage knowledge to help customers by using the Knowledge Capture app. This app allows agents to search the Help Center without leaving the ticket, insert links to relevant Help Center articles in ticket comments, add inline feedback to existing articles, and create new articles while answering tickets using a pre-defined template. This helps agents assist customers effectively while also enhancing self-service options for other customers.",
"mdText": "Agents can leverage knowledge to help customers by using the Knowledge Capture app. This app allows agents to search the Help Center without leaving the ticket, insert links to relevant Help Center articles in ticket comments, add inline feedback to existing articles, and create new articles while answering tickets using a pre-defined template. This helps agents assist customers effectively while also enhancing self-service options for other customers. - Check if the control number is mandatory for the account you are trying to use. If it is, make sure the control number is correctly entered.\n- Verify that you have the necessary permissions to edit or create journal entries, as permissions can affect your ability to make changes.\n- If the journal entry is already posted, you may need to reverse it and create a new entry with the correct control number.\n## Check out the following resource(s) for more information:\n- [Need to change control while Journal Entry Posting.](https://example.com/670da173611ddba46ef12ed1)\n- [ACCOUNTING SETTINGS: Journals](https://example.com/670da22d611ddba46ef13675)",
"source": "python-ml",
"urls": [
"https://d3v-irisagent.zendesk.com/hc/en-us/articles/360046592594-How-can-agents-leverage-knowledge-to-help-customers"
]
}
}
A sample output of the API when no answer was found. Note that links will be an empty array in this situation and source value will be python-ml.
{
"htmltext": "<p>I’m sorry, but I didn’t find relevant information in the help center. Can you please rephrase your question?</p>",
"links": [],
"linksTitle": "",
"mdText": "I’m sorry, but I didn’t find relevant information in the help center. Can you please rephrase your question?",
"plaintext": "I’m sorry, but I didn’t find relevant information in the help center. Can you please rephrase your question?",
"source": "python-ml",
"urls": []
}
A sample output of the API when the intent to connect with an agent is detected. Note that source value will be intent-tags and the htmltext will contain the phrase I will connect you to an agent now.
{
"htmltext": "Thanks for your patience. I will connect you to an agent now. For your reference, the phone number to contact support is 1-833-835-4662.",
"links": [],
"linksTitle": "",
"mdText": "Thanks for your patience. I will connect you to an agent now. For your reference, the phone number to contact support is 1-833-835-4662.",
"plaintext": "Thanks for your patience. I will connect you to an agent now. For your reference, the phone number to contact support is 1-833-835-4662.",
"source": "intent-tags",
"urls": null
}