Sponsored Prompts
Register Feedback
POST
/
api
/
v1
/
prompt
/
feedback
/
Submit Sponsored Prompt Feedback
curl --request POST \
--url https://dev.thrads.ai/api/v1/prompt/feedback/ \
--header 'Content-Type: application/json' \
--data '
{
"sponsored_prompt_id": "<string>",
"clicked": true,
"number_follow_ups": 123,
"is_sponsor_mentioned": true,
"summary": "<string>"
}
'import requests
url = "https://dev.thrads.ai/api/v1/prompt/feedback/"
payload = {
"sponsored_prompt_id": "<string>",
"clicked": True,
"number_follow_ups": 123,
"is_sponsor_mentioned": True,
"summary": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sponsored_prompt_id: '<string>',
clicked: true,
number_follow_ups: 123,
is_sponsor_mentioned: true,
summary: '<string>'
})
};
fetch('https://dev.thrads.ai/api/v1/prompt/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://dev.thrads.ai/api/v1/prompt/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([
'sponsored_prompt_id' => '<string>',
'clicked' => true,
'number_follow_ups' => 123,
'is_sponsor_mentioned' => true,
'summary' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://dev.thrads.ai/api/v1/prompt/feedback/"
payload := strings.NewReader("{\n \"sponsored_prompt_id\": \"<string>\",\n \"clicked\": true,\n \"number_follow_ups\": 123,\n \"is_sponsor_mentioned\": true,\n \"summary\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://dev.thrads.ai/api/v1/prompt/feedback/")
.header("Content-Type", "application/json")
.body("{\n \"sponsored_prompt_id\": \"<string>\",\n \"clicked\": true,\n \"number_follow_ups\": 123,\n \"is_sponsor_mentioned\": true,\n \"summary\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.thrads.ai/api/v1/prompt/feedback/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sponsored_prompt_id\": \"<string>\",\n \"clicked\": true,\n \"number_follow_ups\": 123,\n \"is_sponsor_mentioned\": true,\n \"summary\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"apiVersion": "<string>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"totalTime": 123,
"status": "success",
"message": "<string>",
"data": {}
}{
"apiVersion": "<string>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"totalTime": 123,
"status": "error",
"message": "<string>",
"data": {},
"error": {
"type": "<string>",
"code": 123
}
}{
"apiVersion": "<string>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"totalTime": 123,
"status": "error",
"message": "<string>",
"data": {},
"error": {
"type": "<string>",
"code": 123
}
}{
"apiVersion": "<string>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"totalTime": 123,
"status": "error",
"message": "<string>",
"data": {},
"error": {
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
}{
"apiVersion": "<string>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"totalTime": 123,
"status": "error",
"message": "<string>",
"data": {},
"error": {
"type": "<string>",
"code": 123
}
}Body
application/json
Request model for submitting feedback on sponsored chatbot prompts
ID of the sponsored prompt the feedback refers to
Whether the user clicked the sponsored prompt link
How many follow-up messages occurred after showing the prompt
Whether the sponsor was mentioned in the subsequent conversation
Short summary of the user interaction or feedback context
Response
Version of the Thrads API being used
Unique identifier for this API request for tracking and debugging
ISO 8601 timestamp when the response was generated
URL to the API documentation for reference
Total processing time for the request in seconds
Always 'success' for successful requests
Available options:
success Human-readable message describing the successful response
Response payload containing the requested data
⌘I
Submit Sponsored Prompt Feedback
curl --request POST \
--url https://dev.thrads.ai/api/v1/prompt/feedback/ \
--header 'Content-Type: application/json' \
--data '
{
"sponsored_prompt_id": "<string>",
"clicked": true,
"number_follow_ups": 123,
"is_sponsor_mentioned": true,
"summary": "<string>"
}
'import requests
url = "https://dev.thrads.ai/api/v1/prompt/feedback/"
payload = {
"sponsored_prompt_id": "<string>",
"clicked": True,
"number_follow_ups": 123,
"is_sponsor_mentioned": True,
"summary": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
sponsored_prompt_id: '<string>',
clicked: true,
number_follow_ups: 123,
is_sponsor_mentioned: true,
summary: '<string>'
})
};
fetch('https://dev.thrads.ai/api/v1/prompt/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://dev.thrads.ai/api/v1/prompt/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([
'sponsored_prompt_id' => '<string>',
'clicked' => true,
'number_follow_ups' => 123,
'is_sponsor_mentioned' => true,
'summary' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://dev.thrads.ai/api/v1/prompt/feedback/"
payload := strings.NewReader("{\n \"sponsored_prompt_id\": \"<string>\",\n \"clicked\": true,\n \"number_follow_ups\": 123,\n \"is_sponsor_mentioned\": true,\n \"summary\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://dev.thrads.ai/api/v1/prompt/feedback/")
.header("Content-Type", "application/json")
.body("{\n \"sponsored_prompt_id\": \"<string>\",\n \"clicked\": true,\n \"number_follow_ups\": 123,\n \"is_sponsor_mentioned\": true,\n \"summary\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.thrads.ai/api/v1/prompt/feedback/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"sponsored_prompt_id\": \"<string>\",\n \"clicked\": true,\n \"number_follow_ups\": 123,\n \"is_sponsor_mentioned\": true,\n \"summary\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"apiVersion": "<string>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"totalTime": 123,
"status": "success",
"message": "<string>",
"data": {}
}{
"apiVersion": "<string>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"totalTime": 123,
"status": "error",
"message": "<string>",
"data": {},
"error": {
"type": "<string>",
"code": 123
}
}{
"apiVersion": "<string>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"totalTime": 123,
"status": "error",
"message": "<string>",
"data": {},
"error": {
"type": "<string>",
"code": 123
}
}{
"apiVersion": "<string>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"totalTime": 123,
"status": "error",
"message": "<string>",
"data": {},
"error": {
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
}{
"apiVersion": "<string>",
"requestId": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"docsUrl": "<string>",
"totalTime": 123,
"status": "error",
"message": "<string>",
"data": {},
"error": {
"type": "<string>",
"code": 123
}
}