POST/api/v1/audiences/reactions
Get or generate audience reactions
Each persona reacts to the document with a letter grade, judgments, evidence and actions. Reactions are cached per persona and document; pass force_refresh to regenerate. include: ["why_it_matters"] adds a grounded note on why the document matters to each persona.
REQUEST BODY · APPLICATION/JSON · REQUIRED
{
"document": {
"document_type": "press_release",
"title": "Q3 pricing announcement"
},
"force_refresh": false,
"generation_source": "api",
"include": [
"why_it_matters"
],
"personas": [
{
"id": "d4e9b2a1-6c3f-4b8e-9f21-0a7c5e3d1b60"
}
],
"skip_save": false
}
REQUEST
curl -X POST "https://gateway.kumkuat.ai/api/v1/audiences/reactions" \
-H "X-API-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"document": {
"document_type": "press_release",
"title": "Q3 pricing announcement"
},
"force_refresh": false,
"generation_source": "api",
"include": [
"why_it_matters"
],
"personas": [
{
"id": "d4e9b2a1-6c3f-4b8e-9f21-0a7c5e3d1b60"
}
],
"skip_save": false
}'
import requests
r = requests.post("https://gateway.kumkuat.ai/api/v1/audiences/reactions", headers={"X-API-Key": "YOUR_KEY"}, json={
"document": {
"document_type": "press_release",
"title": "Q3 pricing announcement"
},
"force_refresh": False,
"generation_source": "api",
"include": [
"why_it_matters"
],
"personas": [
{
"id": "d4e9b2a1-6c3f-4b8e-9f21-0a7c5e3d1b60"
}
],
"skip_save": False
})
print(r.status_code, r.headers.get("X-Gw-Remaining"))
print(r.json())
const r = await fetch("https://gateway.kumkuat.ai/api/v1/audiences/reactions", {
method: "POST",
headers: { "X-API-Key": "YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({
"document": {
"document_type": "press_release",
"title": "Q3 pricing announcement"
},
"force_refresh": false,
"generation_source": "api",
"include": [
"why_it_matters"
],
"personas": [
{
"id": "d4e9b2a1-6c3f-4b8e-9f21-0a7c5e3d1b60"
}
],
"skip_save": false
})
});
console.log(r.status, r.headers.get("X-Gw-Remaining"));
console.log(await r.json());
RESPONSE
200OK
{
"cache_hits": 1,
"document": {},
"failed": 1,
"generated": 1,
"insights": [
{
"cache_hit": false,
"document": {},
"grade": "B",
"output_content": "string",
"output_json": {},
"persona": {
"description": "",
"id": "string",
"name": "string"
},
"status": "completed",
"status_counts": {
"bad": 0,
"good": 0,
"warn": 0
}
}
],
"message": "Persona reaction insights ready",
"project_attached": false,
"prompt_version": "string",
"timed_out": 1,
"workspace_id": "string"
}
