Send User Feedback
curl --request POST \
--url https://backend.nebuly.com/event-ingestion/api/v1/events/feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"feedback": {
"slug": "<string>",
"text": "<string>",
"value": 123
},
"metadata": {
"input": "<string>",
"output": "<string>",
"end_user": "<string>",
"timestamp": "<string>",
"anonymize": true
}
}
'import requests
url = "https://backend.nebuly.com/event-ingestion/api/v1/events/feedback"
payload = {
"feedback": {
"slug": "<string>",
"text": "<string>",
"value": 123
},
"metadata": {
"input": "<string>",
"output": "<string>",
"end_user": "<string>",
"timestamp": "<string>",
"anonymize": True
}
}
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({
feedback: {slug: '<string>', text: '<string>', value: 123},
metadata: {
input: '<string>',
output: '<string>',
end_user: '<string>',
timestamp: '<string>',
anonymize: true
}
})
};
fetch('https://backend.nebuly.com/event-ingestion/api/v1/events/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://backend.nebuly.com/event-ingestion/api/v1/events/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([
'feedback' => [
'slug' => '<string>',
'text' => '<string>',
'value' => 123
],
'metadata' => [
'input' => '<string>',
'output' => '<string>',
'end_user' => '<string>',
'timestamp' => '<string>',
'anonymize' => true
]
]),
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://backend.nebuly.com/event-ingestion/api/v1/events/feedback"
payload := strings.NewReader("{\n \"feedback\": {\n \"slug\": \"<string>\",\n \"text\": \"<string>\",\n \"value\": 123\n },\n \"metadata\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"end_user\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"anonymize\": true\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://backend.nebuly.com/event-ingestion/api/v1/events/feedback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"feedback\": {\n \"slug\": \"<string>\",\n \"text\": \"<string>\",\n \"value\": 123\n },\n \"metadata\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"end_user\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"anonymize\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.nebuly.com/event-ingestion/api/v1/events/feedback")
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 \"feedback\": {\n \"slug\": \"<string>\",\n \"text\": \"<string>\",\n \"value\": 123\n },\n \"metadata\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"end_user\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"anonymize\": true\n }\n}"
response = http.request(request)
puts response.read_bodyInstrument (Optional)
Send User Feedback
POST
/
event-ingestion
/
api
/
v1
/
events
/
feedback
Send User Feedback
curl --request POST \
--url https://backend.nebuly.com/event-ingestion/api/v1/events/feedback \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"feedback": {
"slug": "<string>",
"text": "<string>",
"value": 123
},
"metadata": {
"input": "<string>",
"output": "<string>",
"end_user": "<string>",
"timestamp": "<string>",
"anonymize": true
}
}
'import requests
url = "https://backend.nebuly.com/event-ingestion/api/v1/events/feedback"
payload = {
"feedback": {
"slug": "<string>",
"text": "<string>",
"value": 123
},
"metadata": {
"input": "<string>",
"output": "<string>",
"end_user": "<string>",
"timestamp": "<string>",
"anonymize": True
}
}
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({
feedback: {slug: '<string>', text: '<string>', value: 123},
metadata: {
input: '<string>',
output: '<string>',
end_user: '<string>',
timestamp: '<string>',
anonymize: true
}
})
};
fetch('https://backend.nebuly.com/event-ingestion/api/v1/events/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://backend.nebuly.com/event-ingestion/api/v1/events/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([
'feedback' => [
'slug' => '<string>',
'text' => '<string>',
'value' => 123
],
'metadata' => [
'input' => '<string>',
'output' => '<string>',
'end_user' => '<string>',
'timestamp' => '<string>',
'anonymize' => true
]
]),
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://backend.nebuly.com/event-ingestion/api/v1/events/feedback"
payload := strings.NewReader("{\n \"feedback\": {\n \"slug\": \"<string>\",\n \"text\": \"<string>\",\n \"value\": 123\n },\n \"metadata\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"end_user\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"anonymize\": true\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://backend.nebuly.com/event-ingestion/api/v1/events/feedback")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"feedback\": {\n \"slug\": \"<string>\",\n \"text\": \"<string>\",\n \"value\": 123\n },\n \"metadata\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"end_user\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"anonymize\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://backend.nebuly.com/event-ingestion/api/v1/events/feedback")
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 \"feedback\": {\n \"slug\": \"<string>\",\n \"text\": \"<string>\",\n \"value\": 123\n },\n \"metadata\": {\n \"input\": \"<string>\",\n \"output\": \"<string>\",\n \"end_user\": \"<string>\",\n \"timestamp\": \"<string>\",\n \"anonymize\": true\n }\n}"
response = http.request(request)
puts response.read_bodyThis endpoint allows you to send user feedbacks collected from your application’s frontend. In particular, it enables you to link end-user feedback or instances where users copy and paste text generated by the AI system to the corresponding user interaction.
User feedbacks are linked to an interaction using the end_user, input, and output fields you can provide in the metadata. The platform expects the interaction to have already been sent when submitting a user feedback, and the timestamp of the user feedback must be after the timestamp marking the end of the interaction generation.
The user feedback you are tracking.
Show properties
Show properties
This represents the types of user feedbacks you are sending to the platform. Accepted values are:
- thumbs_up: Indicates that the end user has given a thumbs up. The text field can be used to include any additional comments left by the user.
- thumbs_down: Indicates that the end user has given a thumbs down. The text field can be used to include any additional comments left by the user.
- copy_input: Indicates that the user has copied the input message. In this case, the text field should contain the portion of the input that was copied.
- copy_output: Indicates that the user has copied the output message. In this case, the text field should contain the portion of the output that was copied.
- paste: Indicates that the user has pasted some text into the chatbot input box. The text field should contain the pasted text.
- rating: Indicates that the user has given a score to the chatbot, from 1 to 5. With this slug, you should use the field value instead of the text field.
The text given as extra context to the slug. See slug description for further info.
The score given by the user. It can be an integer between 1 and 5. This field is only used when the slug is “rating”.
Metadata is required to accurately associate the user feedback with its corresponding interaction.
Show properties
Show properties
The input of the interactions to which the action refers to. If not given the interaction will be determined using the action time-stamp and the end-user id.
The output of the interactions to which the action refers to. If not given the interaction will be determined using the action time-stamp and the end-user id.
The identified used for the end-user.
The timestamp of the action event.
Boolean flag. If set to true, PII will be removed from the text field.
⌘I