Upsert feedback
curl --request POST \
--url https://api.illuminalab.com/v1/feedback/ \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_id": "<string>",
"sentiment": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment": "<string>",
"resource_id": "<string>"
}
'import requests
url = "https://api.illuminalab.com/v1/feedback/"
payload = {
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_id": "<string>",
"sentiment": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment": "<string>",
"resource_id": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
thread_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
message_id: '<string>',
sentiment: 2,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
comment: '<string>',
resource_id: '<string>'
})
};
fetch('https://api.illuminalab.com/v1/feedback/', 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://api.illuminalab.com/v1/feedback/",
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([
'thread_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'message_id' => '<string>',
'sentiment' => 2,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'comment' => '<string>',
'resource_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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://api.illuminalab.com/v1/feedback/"
payload := strings.NewReader("{\n \"thread_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"message_id\": \"<string>\",\n \"sentiment\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\",\n \"resource_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
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://api.illuminalab.com/v1/feedback/")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"thread_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"message_id\": \"<string>\",\n \"sentiment\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\",\n \"resource_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.illuminalab.com/v1/feedback/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"thread_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"message_id\": \"<string>\",\n \"sentiment\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\",\n \"resource_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"feedback": {
"id": "<string>",
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_id": "<string>",
"sentiment": 2,
"comment": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}feedback
Upsert feedback
Create or update feedback for a message or thread. For message feedback, provide message_id and use sentiment values of -1 (down) or 1 (up). For thread feedback, omit message_id and use sentiment values from 0 to 5.
POST
/
v1
/
feedback
/
Upsert feedback
curl --request POST \
--url https://api.illuminalab.com/v1/feedback/ \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_id": "<string>",
"sentiment": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment": "<string>",
"resource_id": "<string>"
}
'import requests
url = "https://api.illuminalab.com/v1/feedback/"
payload = {
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_id": "<string>",
"sentiment": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"comment": "<string>",
"resource_id": "<string>"
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
thread_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
message_id: '<string>',
sentiment: 2,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
comment: '<string>',
resource_id: '<string>'
})
};
fetch('https://api.illuminalab.com/v1/feedback/', 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://api.illuminalab.com/v1/feedback/",
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([
'thread_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'message_id' => '<string>',
'sentiment' => 2,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'comment' => '<string>',
'resource_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"authorization: <authorization>"
],
]);
$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://api.illuminalab.com/v1/feedback/"
payload := strings.NewReader("{\n \"thread_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"message_id\": \"<string>\",\n \"sentiment\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\",\n \"resource_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("authorization", "<authorization>")
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://api.illuminalab.com/v1/feedback/")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"thread_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"message_id\": \"<string>\",\n \"sentiment\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\",\n \"resource_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.illuminalab.com/v1/feedback/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"thread_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"message_id\": \"<string>\",\n \"sentiment\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"comment\": \"<string>\",\n \"resource_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"feedback": {
"id": "<string>",
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_id": "<string>",
"sentiment": 2,
"comment": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Headers
Pattern:
^Bearer [\s\S]{0,}$Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
UUID of the thread
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$UUID of the message
Sentiment rating; for messages, use -1 for down and 1 for up. For threads, use a score from 0 to 5.
Required range:
-1 <= x <= 5UUID of the feedback
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Optional feedback comment
Optional resource identifier
Response
Response for status 200
The feedback object
Show child attributes
Show child attributes
⌘I