Submit feedback on a result
curl --request POST \
--url https://api.prd.realitydefender.xyz/api/v2/user-feedback \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"requestId": "8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e",
"label": "REAL",
"feedbackCategory": "CONFIRMATION",
"comment": "Looks correct in context."
}
'import requests
url = "https://api.prd.realitydefender.xyz/api/v2/user-feedback"
payload = {
"requestId": "8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e",
"label": "REAL",
"feedbackCategory": "CONFIRMATION",
"comment": "Looks correct in context."
}
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({
requestId: '8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e',
label: 'REAL',
feedbackCategory: 'CONFIRMATION',
comment: 'Looks correct in context.'
})
};
fetch('https://api.prd.realitydefender.xyz/api/v2/user-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.prd.realitydefender.xyz/api/v2/user-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([
'requestId' => '8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e',
'label' => 'REAL',
'feedbackCategory' => 'CONFIRMATION',
'comment' => 'Looks correct in context.'
]),
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.prd.realitydefender.xyz/api/v2/user-feedback"
payload := strings.NewReader("{\n \"requestId\": \"8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e\",\n \"label\": \"REAL\",\n \"feedbackCategory\": \"CONFIRMATION\",\n \"comment\": \"Looks correct in context.\"\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.prd.realitydefender.xyz/api/v2/user-feedback")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e\",\n \"label\": \"REAL\",\n \"feedbackCategory\": \"CONFIRMATION\",\n \"comment\": \"Looks correct in context.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prd.realitydefender.xyz/api/v2/user-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 \"requestId\": \"8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e\",\n \"label\": \"REAL\",\n \"feedbackCategory\": \"CONFIRMATION\",\n \"comment\": \"Looks correct in context.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"userId": "user_0123456789abcdef",
"requestId": "8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e",
"institutionId": "3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
"text": "Looks correct in context.",
"category": "CONFIRMATION",
"userName": "Jane Doe",
"userEmail": "jane@example.com",
"orgName": "Organization name",
"mediaType": "VIDEO",
"mediaViewUrl": "https://app.realitydefender.ai/media/8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e",
"mediaSource": "api:My integration key",
"label": "REAL",
"createdAt": "2025-01-15T12:00:00.000Z",
"updatedAt": "2025-01-15T12:00:00.000Z"
}{
"statusCode": 400,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}{
"statusCode": 403,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}{
"statusCode": 123,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}RealScan
Submit feedback on a result
Records the caller’s label and feedback category for a completed scan result, attributed to the caller and their organization.
Feedback may be submitted by the user who uploaded the media or by any
member of the same organization. The caller also needs a RealScan
role (owner, admin, contributor or viewer). Other callers get 403 “Forbidden resource”.
Errors
400— no media result exists for the givenrequestId("Media result does not exist!").401— authentication failed.403— the caller may not submit feedback for that result ("You are not authorized to create feedback for this media result!"), or the caller’s role is not allowed ("Forbidden resource").
POST
/
api
/
v2
/
user-feedback
Submit feedback on a result
curl --request POST \
--url https://api.prd.realitydefender.xyz/api/v2/user-feedback \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"requestId": "8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e",
"label": "REAL",
"feedbackCategory": "CONFIRMATION",
"comment": "Looks correct in context."
}
'import requests
url = "https://api.prd.realitydefender.xyz/api/v2/user-feedback"
payload = {
"requestId": "8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e",
"label": "REAL",
"feedbackCategory": "CONFIRMATION",
"comment": "Looks correct in context."
}
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({
requestId: '8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e',
label: 'REAL',
feedbackCategory: 'CONFIRMATION',
comment: 'Looks correct in context.'
})
};
fetch('https://api.prd.realitydefender.xyz/api/v2/user-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.prd.realitydefender.xyz/api/v2/user-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([
'requestId' => '8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e',
'label' => 'REAL',
'feedbackCategory' => 'CONFIRMATION',
'comment' => 'Looks correct in context.'
]),
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.prd.realitydefender.xyz/api/v2/user-feedback"
payload := strings.NewReader("{\n \"requestId\": \"8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e\",\n \"label\": \"REAL\",\n \"feedbackCategory\": \"CONFIRMATION\",\n \"comment\": \"Looks correct in context.\"\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.prd.realitydefender.xyz/api/v2/user-feedback")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e\",\n \"label\": \"REAL\",\n \"feedbackCategory\": \"CONFIRMATION\",\n \"comment\": \"Looks correct in context.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prd.realitydefender.xyz/api/v2/user-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 \"requestId\": \"8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e\",\n \"label\": \"REAL\",\n \"feedbackCategory\": \"CONFIRMATION\",\n \"comment\": \"Looks correct in context.\"\n}"
response = http.request(request)
puts response.read_body{
"id": "5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f",
"userId": "user_0123456789abcdef",
"requestId": "8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e",
"institutionId": "3f2a1b4c-5d6e-4f70-8a9b-0c1d2e3f4a5b",
"text": "Looks correct in context.",
"category": "CONFIRMATION",
"userName": "Jane Doe",
"userEmail": "jane@example.com",
"orgName": "Organization name",
"mediaType": "VIDEO",
"mediaViewUrl": "https://app.realitydefender.ai/media/8b0d4c1e-2f3a-4b5c-8d6e-7f8a9b0c1d2e",
"mediaSource": "api:My integration key",
"label": "REAL",
"createdAt": "2025-01-15T12:00:00.000Z",
"updatedAt": "2025-01-15T12:00:00.000Z"
}{
"statusCode": 400,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}{
"statusCode": 403,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}{
"statusCode": 123,
"path": "<string>",
"message": "<string>",
"code": "<string>",
"type": "<string>",
"name": "<string>",
"explanation": "<string>"
}Authorizations
Body
application/json
Response
User feedback created
Created feedback record. Field presence may vary with the user profile and the stored result.