curl --request POST \
--url https://api.bodyguard.ai/feedback/v1/username \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"analyzeRequest": {
"sourceId": "__YOUR_SOURCE_ID__",
"username": "cool_gamer_99"
},
"classificationsToAdd": [
"DRUGS"
],
"notes": "Slang reference to drugs that Bodyguard did not catch.",
"confidence": "LOW"
}
'import requests
url = "https://api.bodyguard.ai/feedback/v1/username"
payload = {
"analyzeRequest": {
"sourceId": "__YOUR_SOURCE_ID__",
"username": "cool_gamer_99"
},
"classificationsToAdd": ["DRUGS"],
"notes": "Slang reference to drugs that Bodyguard did not catch.",
"confidence": "LOW"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
analyzeRequest: {sourceId: '__YOUR_SOURCE_ID__', username: 'cool_gamer_99'},
classificationsToAdd: ['DRUGS'],
notes: 'Slang reference to drugs that Bodyguard did not catch.',
confidence: 'LOW'
})
};
fetch('https://api.bodyguard.ai/feedback/v1/username', 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.bodyguard.ai/feedback/v1/username",
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([
'analyzeRequest' => [
'sourceId' => '__YOUR_SOURCE_ID__',
'username' => 'cool_gamer_99'
],
'classificationsToAdd' => [
'DRUGS'
],
'notes' => 'Slang reference to drugs that Bodyguard did not catch.',
'confidence' => 'LOW'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.bodyguard.ai/feedback/v1/username"
payload := strings.NewReader("{\n \"analyzeRequest\": {\n \"sourceId\": \"__YOUR_SOURCE_ID__\",\n \"username\": \"cool_gamer_99\"\n },\n \"classificationsToAdd\": [\n \"DRUGS\"\n ],\n \"notes\": \"Slang reference to drugs that Bodyguard did not catch.\",\n \"confidence\": \"LOW\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.bodyguard.ai/feedback/v1/username")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"analyzeRequest\": {\n \"sourceId\": \"__YOUR_SOURCE_ID__\",\n \"username\": \"cool_gamer_99\"\n },\n \"classificationsToAdd\": [\n \"DRUGS\"\n ],\n \"notes\": \"Slang reference to drugs that Bodyguard did not catch.\",\n \"confidence\": \"LOW\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bodyguard.ai/feedback/v1/username")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"analyzeRequest\": {\n \"sourceId\": \"__YOUR_SOURCE_ID__\",\n \"username\": \"cool_gamer_99\"\n },\n \"classificationsToAdd\": [\n \"DRUGS\"\n ],\n \"notes\": \"Slang reference to drugs that Bodyguard did not catch.\",\n \"confidence\": \"LOW\"\n}"
response = http.request(request)
puts response.read_body{
"id": "018f3b06-1a2f-7d40-bb55-9c0a3e7f2d18"
}Username analysis feedback
Sends feedback on a classification returned by POST /analyze/v1/username that you judge incorrect for a given username, with the classifications you would have expected instead.
Send the exact analyze request body you originally submitted in analyzeRequest so Bodyguard can reproduce the analysis your feedback refers to.
Before diving in, we recommend reading the username taxonomy to understand the classifications you can add or remove.
curl --request POST \
--url https://api.bodyguard.ai/feedback/v1/username \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"analyzeRequest": {
"sourceId": "__YOUR_SOURCE_ID__",
"username": "cool_gamer_99"
},
"classificationsToAdd": [
"DRUGS"
],
"notes": "Slang reference to drugs that Bodyguard did not catch.",
"confidence": "LOW"
}
'import requests
url = "https://api.bodyguard.ai/feedback/v1/username"
payload = {
"analyzeRequest": {
"sourceId": "__YOUR_SOURCE_ID__",
"username": "cool_gamer_99"
},
"classificationsToAdd": ["DRUGS"],
"notes": "Slang reference to drugs that Bodyguard did not catch.",
"confidence": "LOW"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
analyzeRequest: {sourceId: '__YOUR_SOURCE_ID__', username: 'cool_gamer_99'},
classificationsToAdd: ['DRUGS'],
notes: 'Slang reference to drugs that Bodyguard did not catch.',
confidence: 'LOW'
})
};
fetch('https://api.bodyguard.ai/feedback/v1/username', 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.bodyguard.ai/feedback/v1/username",
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([
'analyzeRequest' => [
'sourceId' => '__YOUR_SOURCE_ID__',
'username' => 'cool_gamer_99'
],
'classificationsToAdd' => [
'DRUGS'
],
'notes' => 'Slang reference to drugs that Bodyguard did not catch.',
'confidence' => 'LOW'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://api.bodyguard.ai/feedback/v1/username"
payload := strings.NewReader("{\n \"analyzeRequest\": {\n \"sourceId\": \"__YOUR_SOURCE_ID__\",\n \"username\": \"cool_gamer_99\"\n },\n \"classificationsToAdd\": [\n \"DRUGS\"\n ],\n \"notes\": \"Slang reference to drugs that Bodyguard did not catch.\",\n \"confidence\": \"LOW\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.bodyguard.ai/feedback/v1/username")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"analyzeRequest\": {\n \"sourceId\": \"__YOUR_SOURCE_ID__\",\n \"username\": \"cool_gamer_99\"\n },\n \"classificationsToAdd\": [\n \"DRUGS\"\n ],\n \"notes\": \"Slang reference to drugs that Bodyguard did not catch.\",\n \"confidence\": \"LOW\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bodyguard.ai/feedback/v1/username")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"analyzeRequest\": {\n \"sourceId\": \"__YOUR_SOURCE_ID__\",\n \"username\": \"cool_gamer_99\"\n },\n \"classificationsToAdd\": [\n \"DRUGS\"\n ],\n \"notes\": \"Slang reference to drugs that Bodyguard did not catch.\",\n \"confidence\": \"LOW\"\n}"
response = http.request(request)
puts response.read_body{
"id": "018f3b06-1a2f-7d40-bb55-9c0a3e7f2d18"
}Authorizations
API key authentication. Provide your key in the Authorization
header with the ApiKey scheme:
Authorization: ApiKey <your-api-key>
Body
Feedback on a username analysis. Provide at least one of classificationsToAdd, classificationsToRemove, or notes — a request with none of the three is considered invalid.
Classifications Bodyguard returned that you judge do not apply to this content. See the username taxonomy for the full list.
Classifications you judge apply to this content but that Bodyguard did not return. See the username taxonomy for the full list.
["DRUGS"]
Free-text comment explaining why you judge the content differently. Counts on its own: a feedback carrying only notes, with no classification change, is valid.
How confident you are about the classifications you submitted. Bodyguard uses it to prioritise which feedback to review first. You can base it on who flagged the content on your side — for example LOW or MEDIUM for a report from an end-user, HIGH or VERY_HIGH for a decision from your Trust & Safety team. Optional — omit it if you cannot qualify your confidence.
LOW, MEDIUM, HIGH, VERY_HIGH Response
Feedback recorded.
Bodyguard's identifier for this feedback.