curl --request POST \
--url https://api1.irisagent.com/v1/irisgpt/ask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"productId": "<string>",
"voiceChannel": false,
"images": [
{
"url": "<string>",
"base64": "<string>",
"mimeType": "<string>"
}
]
}
'import requests
url = "https://api1.irisagent.com/v1/irisgpt/ask"
payload = {
"query": "<string>",
"productId": "<string>",
"voiceChannel": False,
"images": [
{
"url": "<string>",
"base64": "<string>",
"mimeType": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
productId: '<string>',
voiceChannel: false,
images: [{url: '<string>', base64: '<string>', mimeType: '<string>'}]
})
};
fetch('https://api1.irisagent.com/v1/irisgpt/ask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api1.irisagent.com/v1/irisgpt/ask",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'productId' => '<string>',
'voiceChannel' => false,
'images' => [
[
'url' => '<string>',
'base64' => '<string>',
'mimeType' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api1.irisagent.com/v1/irisgpt/ask"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"productId\": \"<string>\",\n \"voiceChannel\": false,\n \"images\": [\n {\n \"url\": \"<string>\",\n \"base64\": \"<string>\",\n \"mimeType\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api1.irisagent.com/v1/irisgpt/ask")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"productId\": \"<string>\",\n \"voiceChannel\": false,\n \"images\": [\n {\n \"url\": \"<string>\",\n \"base64\": \"<string>\",\n \"mimeType\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api1.irisagent.com/v1/irisgpt/ask")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"productId\": \"<string>\",\n \"voiceChannel\": false,\n \"images\": [\n {\n \"url\": \"<string>\",\n \"base64\": \"<string>\",\n \"mimeType\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"mdText": "<string>",
"htmltext": "<string>",
"source": "<string>",
"plaintext": "<string>",
"id": "<string>",
"responseType": "no-answer",
"intentTag": "<string>",
"procedure": "<string>",
"escalate": true,
"linksTitle": "<string>",
"links": [
{
"text": "<string>",
"url": "<string>"
}
],
"urls": [
"<string>"
]
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}Get AI answer to any query
Get an AI answer to any support query using the trained information such as knowledge articles, tickets, documentation, and more.
curl --request POST \
--url https://api1.irisagent.com/v1/irisgpt/ask \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"productId": "<string>",
"voiceChannel": false,
"images": [
{
"url": "<string>",
"base64": "<string>",
"mimeType": "<string>"
}
]
}
'import requests
url = "https://api1.irisagent.com/v1/irisgpt/ask"
payload = {
"query": "<string>",
"productId": "<string>",
"voiceChannel": False,
"images": [
{
"url": "<string>",
"base64": "<string>",
"mimeType": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
query: '<string>',
productId: '<string>',
voiceChannel: false,
images: [{url: '<string>', base64: '<string>', mimeType: '<string>'}]
})
};
fetch('https://api1.irisagent.com/v1/irisgpt/ask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api1.irisagent.com/v1/irisgpt/ask",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'query' => '<string>',
'productId' => '<string>',
'voiceChannel' => false,
'images' => [
[
'url' => '<string>',
'base64' => '<string>',
'mimeType' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api1.irisagent.com/v1/irisgpt/ask"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"productId\": \"<string>\",\n \"voiceChannel\": false,\n \"images\": [\n {\n \"url\": \"<string>\",\n \"base64\": \"<string>\",\n \"mimeType\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api1.irisagent.com/v1/irisgpt/ask")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"productId\": \"<string>\",\n \"voiceChannel\": false,\n \"images\": [\n {\n \"url\": \"<string>\",\n \"base64\": \"<string>\",\n \"mimeType\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api1.irisagent.com/v1/irisgpt/ask")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"productId\": \"<string>\",\n \"voiceChannel\": false,\n \"images\": [\n {\n \"url\": \"<string>\",\n \"base64\": \"<string>\",\n \"mimeType\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"mdText": "<string>",
"htmltext": "<string>",
"source": "<string>",
"plaintext": "<string>",
"id": "<string>",
"responseType": "no-answer",
"intentTag": "<string>",
"procedure": "<string>",
"escalate": true,
"linksTitle": "<string>",
"links": [
{
"text": "<string>",
"url": "<string>"
}
],
"urls": [
"<string>"
]
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}{
"error": "<string>",
"code": 123,
"status": "<string>"
}Authorizations
Headers
The Chat-Identifier is an optional header 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.
Body
The requestBody contains the information sent to IrisGPT for processing.
The main component is the query, representing the user's input or question.
This body must be sent in JSON format.
Response
The AskResponse represents the structure of the response returned by IrisGPT.
It is formatted in JSON and contains the AI-generated answer to the user's query.
The AskResponseItem schema defines the structure of IrisGPT's response, including both the formatted and plain text versions of the answer, along with relevant links and URLs.