Audiences
Persona categories: list and order them, summarise an audience, and generate reactions for many personas at once.
- List audiencesGET
/api/v1/audiences - Add an audiencePOST
/api/v1/audiences - List audience category namesGET
/api/v1/audiences/categories - List cached audience reactionsGET
/api/v1/audiences/reactions - Get or generate audience reactionsPOST
/api/v1/audiences/reactions - Queue audience reactions as a jobPOST
/api/v1/audiences/reactions/async - Get reaction history for a persona and documentGET
/api/v1/audiences/reactions/history - Get or generate an audience summaryGET
/api/v1/audiences/{category}/summary
List audiences
/api/v1/audiencesThe workspace's audiences (persona categories) in display order.
Returns200 · object
groupsarray of objectRequired4 child fields
- nullable · for example "Investors"
display_namestring idstringRequired- for example "investors"
namestringRequired - default 0
sort_orderinteger
Other responses
422Unprocessable Entity
curl https://api.kumkuat.ai/api/v1/audiences \
-H 'X-API-Key: <api key>'{
"groups": [
{
"display_name": "Investors"
Add an audience
/api/v1/audiencesAdd one audience category.
Responses
422Unprocessable Entity
curl https://api.kumkuat.ai/api/v1/audiences \
-X POST \
-H 'X-API-Key: <api key>'List audience category names
/api/v1/audiences/categoriesThe category names in use, as plain strings.
Returns200 · object
categoriesarray of stringRequired
Other responses
422Unprocessable Entity
curl https://api.kumkuat.ai/api/v1/audiences/categories \
-H 'X-API-Key: <api key>'{
"categories": [
"investors",
"customers",
"employees",
"media"
List cached audience reactions
/api/v1/audiences/reactionsReactions already generated in this workspace.
Responses
422Unprocessable Entity
curl https://api.kumkuat.ai/api/v1/audiences/reactions \
-H 'X-API-Key: <api key>'Get or generate audience reactions
/api/v1/audiences/reactionsEach 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.
Bodyapplication/json · required
documentobjectRequiredWhat they react to.
6 child fields
- nullable
contentstringThe text to react to when no id is given.
- nullable · for example "press_release"
document_typestring - nullable
executivestring - nullable
idstringA workspace document id. Give either id, or title plus content.
- nullable
source_urlstring - nullable · for example "Q3 pricing announcement"
titlestring
- default false
force_refreshbooleanRegenerate even when a cached reaction exists.
- nullable · for example "api"
generation_sourcestring includearray of stringExtra sections to return on each reaction.
why_it_matters: a grounded note on why this document matters to that persona, one web-grounded model call per persona, cached for 7 days. Needs the Why-this-matters feature on the workspace; when it is off the field comes back null.- nullable
modelstring personasarray of objectRequiredWho reacts. One entry per persona; batches are capped.
7 child fields
- nullable
communication_stylestring - nullable
concernsstring - nullable
descriptionstring - nullable
idstringA stored persona id. Omit it and pass name/description/tone to react as an inline persona.
- nullable
interestsstring - nullable
namestring - nullable
tonestring
- nullable
project_idstringAttach the run to a project.
- nullable
run_idstringGroup these reactions under a run.
- default false
skip_savebooleanDo not persist the generated reactions.
Returns200 · object
cache_hitsintegerRequireddocumentobjectRequired6 child fields
- nullable
document_hashstring - nullable
document_typestring - nullable
executivestring - nullable
idstring - nullable
source_urlstring - nullable
titlestring
failedintegerRequiredgeneratedintegerRequiredinsightsarray of objectRequired17 child fields
- default false
cache_hitboolean documentobjectRequired6 child fields
- nullable
document_hashstring - nullable
document_typestring - nullable
executivestring - nullable
idstring - nullable
source_urlstring - nullable
titlestring
- nullable
error_messagestring - nullable
generated_atstring - nullable
generation_sourcestring - nullable · for example "B"
gradestringLetter grade the persona gave, A to F.
- nullable
insight_idstring - nullable
modelstring output_contentstringRequiredThe reaction as prose.
output_jsonobjectThe structured reaction: key_judgments, evidence_and_signals, implications_and_actions, counterpoints_and_risks.
personaobjectRequired3 child fields
- default ""
descriptionstring idstringRequirednamestringRequired
- nullable
prompt_versionstring - nullable
response_languagestring - default "completed"
statusstringcompleted, failed or timed_out.
status_countsobject3 child fields
- default 0
badinteger - default 0
goodinteger - default 0
warninteger
- nullable
updated_atstring - nullable
why_it_mattersobjectOnly when the request listed
why_it_mattersininclude; null when it could not be generated.7 child fields
answerstringRequiredWhy the document matters to this persona, grounded on current web sources and their statements.
- default false
cache_hitboolean - nullable
expires_atstring - nullable
generated_atstring groundedbooleanRequired- nullable
modelstring sourcesarray of objectThe statements and documents the answer cites.
- default "Persona reaction insights ready"
messagestring - default false
project_attachedboolean prompt_versionstringRequiredtimed_outintegerRequired- nullable
translation_target_languagestring - nullable
translation_target_language_namestring - nullable
why_it_mattersobjectOnly when the request listed
why_it_mattersininclude.5 child fields
- default 0
cache_hitsinteger enabledbooleanRequiredFalse when the Why-this-matters feature is off for the workspace; every insight then carries null.
- default 0
failedinteger - default 0
generatedinteger - default 0
requestedinteger
workspace_idstringRequired
Queue audience reactions as a job
/api/v1/audiences/reactions/asyncThe same reactions, generated in the background; poll the returned job.
Responses
422Unprocessable Entity
curl https://api.kumkuat.ai/api/v1/audiences/reactions/async \
-X POST \
-H 'X-API-Key: <api key>'Get reaction history for a persona and document
/api/v1/audiences/reactions/historyEvery reaction one persona has given to one document.
Query parameters
persona_idstringRequiredThe persona.
document_idstringRequiredThe document.
limitintegerMost recent N entries.
Returns200 · object
countintegerRequireddocument_idstringRequiredentriesarray of objectRequired12 child fields
- nullable
cache_keystring - nullable
document_hashstring document_idstringRequired- nullable
generated_atstring - nullable
generation_sourcestring - nullable
gradestring idstringRequired- nullable
modelstring - default ""
output_contentstring persona_idstringRequiredpersona_namestringRequiredstatus_countsobject3 child fields
- default 0
badinteger - default 0
goodinteger - default 0
warninteger
persona_idstringRequired
Other responses
422Unprocessable Entity
curl 'https://api.kumkuat.ai/api/v1/audiences/reactions/history?persona_id=string&document_id=string' \
-H 'X-API-Key: <api key>'Get or generate an audience summary
/api/v1/audiences/{category}/summaryWhat this audience thinks, summarised from its recent reactions.
Path parameters
categorystringRequiredAudience category, as listed by GET /api/v1/audiences.
Query parameters
- default 30
daysintegerReactions from the last N days.
company_tagstringOnly reactions to documents from this company.
pillarstringOnly reactions on this narrative pillar.
force_refreshbooleanRegenerate the summary.
modelstringModel override.
Returns200 · object
cache_hitbooleanRequired- nullable
refreshing_due_to_pillarsboolean - nullable
stalebooleanTrue when a stale cached record was served while a refresh runs.
- nullable
summaryobjectNull when there are no reactions in the window.
11 child fields
categorystringRequiredThe audience category, or persona:<id> for a single persona.
filtersobject- nullable
generated_atstring - nullable · for example "B"
gradestring - nullable
grade_trendstringup, down or flat.
- nullable
idstringPresent on cached records.
- default false
is_staleboolean - default 0
reaction_countinteger status_countsobject3 child fields
- default 0
badinteger - default 0
goodinteger - default 0
warninteger
summary_jsonobjectRequiredheadline, overall_sentiment, top_themes, pillar_reception, top_actions, top_risks, context, data_window.
workspace_idstringRequired
Other responses
422Unprocessable Entity