curl --request POST \
--url https://api.eu.linqalpha.com/v1/conversations/{conversation_id}/feedback \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"conversation_id": "123e4567-e89b-12d3-a456-426614174000",
"rating": "up",
"message_id": "msg_abc123",
"comment": "Very helpful and accurate response!"
}
'import requests
url = "https://api.eu.linqalpha.com/v1/conversations/{conversation_id}/feedback"
payload = {
"conversation_id": "123e4567-e89b-12d3-a456-426614174000",
"rating": "up",
"message_id": "msg_abc123",
"comment": "Very helpful and accurate response!"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conversation_id: '123e4567-e89b-12d3-a456-426614174000',
rating: 'up',
message_id: 'msg_abc123',
comment: 'Very helpful and accurate response!'
})
};
fetch('https://api.eu.linqalpha.com/v1/conversations/{conversation_id}/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.eu.linqalpha.com/v1/conversations/{conversation_id}/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([
'conversation_id' => '123e4567-e89b-12d3-a456-426614174000',
'rating' => 'up',
'message_id' => 'msg_abc123',
'comment' => 'Very helpful and accurate response!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.eu.linqalpha.com/v1/conversations/{conversation_id}/feedback"
payload := strings.NewReader("{\n \"conversation_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"rating\": \"up\",\n \"message_id\": \"msg_abc123\",\n \"comment\": \"Very helpful and accurate response!\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.eu.linqalpha.com/v1/conversations/{conversation_id}/feedback")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"conversation_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"rating\": \"up\",\n \"message_id\": \"msg_abc123\",\n \"comment\": \"Very helpful and accurate response!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.linqalpha.com/v1/conversations/{conversation_id}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"conversation_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"rating\": \"up\",\n \"message_id\": \"msg_abc123\",\n \"comment\": \"Very helpful and accurate response!\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": {
"code": "INVALID_REQUEST_BODY",
"msg": "Invalid rating value. Must be 'up' or 'down'.",
"message": "Invalid rating value. Must be 'up' or 'down'."
},
"payload": null
}{
"error": {
"code": "API_KEY_MISSING",
"msg": "header does not contain api key",
"message": "header does not contain api key"
},
"payload": null
}{
"error": {
"code": "NOT_FOUND",
"message": "Conversation not found.",
"msg": "Conversation not found."
},
"payload": null
}{
"error": {
"code": "CREATE_CONVERSATION_FEEDBACK_FAIL",
"message": "Failed to create conversation feedback.",
"msg": "Failed to create conversation feedback."
},
"payload": null
}Conversation Feedback
Legacy in the EU region. This endpoint is kept for backward compatibility and is not recommended for new EU integrations. There is no direct replacement. Contact support@linqalpha.com before building on it.
Submits feedback for a specific conversation. Use this endpoint to collect user ratings and comments about the quality of AI responses. Feedback helps improve the service and can be used for quality monitoring.
Rating Options:
up: Positive feedback indicating a helpful responsedown: Negative feedback indicating an unsatisfactory response
Optional Fields:
message_id: Target specific message within the conversationcomment: Additional text feedback from the user
curl --request POST \
--url https://api.eu.linqalpha.com/v1/conversations/{conversation_id}/feedback \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"conversation_id": "123e4567-e89b-12d3-a456-426614174000",
"rating": "up",
"message_id": "msg_abc123",
"comment": "Very helpful and accurate response!"
}
'import requests
url = "https://api.eu.linqalpha.com/v1/conversations/{conversation_id}/feedback"
payload = {
"conversation_id": "123e4567-e89b-12d3-a456-426614174000",
"rating": "up",
"message_id": "msg_abc123",
"comment": "Very helpful and accurate response!"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
conversation_id: '123e4567-e89b-12d3-a456-426614174000',
rating: 'up',
message_id: 'msg_abc123',
comment: 'Very helpful and accurate response!'
})
};
fetch('https://api.eu.linqalpha.com/v1/conversations/{conversation_id}/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.eu.linqalpha.com/v1/conversations/{conversation_id}/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([
'conversation_id' => '123e4567-e89b-12d3-a456-426614174000',
'rating' => 'up',
'message_id' => 'msg_abc123',
'comment' => 'Very helpful and accurate response!'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.eu.linqalpha.com/v1/conversations/{conversation_id}/feedback"
payload := strings.NewReader("{\n \"conversation_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"rating\": \"up\",\n \"message_id\": \"msg_abc123\",\n \"comment\": \"Very helpful and accurate response!\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.eu.linqalpha.com/v1/conversations/{conversation_id}/feedback")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"conversation_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"rating\": \"up\",\n \"message_id\": \"msg_abc123\",\n \"comment\": \"Very helpful and accurate response!\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.linqalpha.com/v1/conversations/{conversation_id}/feedback")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"conversation_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"rating\": \"up\",\n \"message_id\": \"msg_abc123\",\n \"comment\": \"Very helpful and accurate response!\"\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": {
"code": "INVALID_REQUEST_BODY",
"msg": "Invalid rating value. Must be 'up' or 'down'.",
"message": "Invalid rating value. Must be 'up' or 'down'."
},
"payload": null
}{
"error": {
"code": "API_KEY_MISSING",
"msg": "header does not contain api key",
"message": "header does not contain api key"
},
"payload": null
}{
"error": {
"code": "NOT_FOUND",
"message": "Conversation not found.",
"msg": "Conversation not found."
},
"payload": null
}{
"error": {
"code": "CREATE_CONVERSATION_FEEDBACK_FAIL",
"message": "Failed to create conversation feedback.",
"msg": "Failed to create conversation feedback."
},
"payload": null
}Authorizations
Path Parameters
The unique identifier of the conversation to provide feedback for
Body
The unique identifier of the conversation
"123e4567-e89b-12d3-a456-426614174000"
Feedback rating: 'up' for positive, 'down' for negative
up, down "up"
Organization ID (optional, inferred from API key if not provided)
"org_001"
User ID submitting the feedback (optional)
"user_123"
User email (optional)
"user@example.com"
User name (optional)
"John Doe"
Specific message ID to provide feedback on (optional)
"msg_abc123"
Additional text comment from the user (optional)
"Very helpful and accurate response!"
Response
Feedback submitted successfully
Indicates whether the feedback was successfully submitted
true