# Personas

> A section of the Kumkuat API 1.0.0 reference. The rest of it: https://product.tech/docs-kumkuat-ai/api-reference.md (API Reference). Base URL: `https://api.kumkuat.ai`.

Create, ground and query the synthetic personas in a workspace: interact, summarise, write in their voice.

## Get all personas

`GET /api/v1/personas`

Get persona templates for the current workspace, optionally filtered by category.

Supports pagination via ``limit`` (default 200, max 500) and ``offset`` (default 0). Response includes ``total`` count before pagination so callers can detect truncation. Use ``?summary=1`` for the lightweight listing (no pagination cap applies there since summary objects are ~200B each).

### Query parameters

- `category` (string): Only personas in this audience category.
- `limit` (integer, default 200): Page size, up to 500.
- `offset` (integer, default 0): Skip this many personas.
- `summary` (string): Set to 1 for a lighter listing: identity, category, avatar, flags and health, with no prompts. Summary mode is not paginated.

### Returns (200, object)

OK

- `limit` (integer, nullable): Absent in summary mode.
- `offset` (integer, nullable)
- `personas` (array of object, required)
  - `avatar_source` (string, default "")
  - `avatar_url` (string, default "")
  - `category` (string, required, for example "investors"): Audience category the persona belongs to.
  - `communication_style` (string, default "")
  - `concerns` (string, default "")
  - `created_at` (string, required, for example "2026-09-29T16:40:12+00:00")
  - `created_by` (string, default "system")
  - `default_voice_profile_id` (string, nullable)
  - `description` (string, nullable)
  - `entity_kind` (string, default ""): person, organization, segment or empty when not set.
  - `entity_kind_resolved` (string, default "")
  - `external_sources` (array of object)
  - `grounded_statements` (array of object): Statements the persona is grounded on, with their sources.
  - `health_state` (object)
  - `id` (string, required, for example "d4e9b2a1-6c3f-4b8e-9f21-0a7c5e3d1b60")
  - `include_in_audience` (boolean, default true): Whether the persona takes part in audience-wide reactions.
  - `include_in_voice_list` (boolean, default false): Whether the persona is offered as a writing voice.
  - `instructions` (string, default ""): How the persona should behave when it reacts.
  - `interests` (string, default "")
  - `is_active` (boolean, default true)
  - `is_linked_to_source` (boolean, default false)
  - `is_marketplace_managed` (boolean, nullable)
  - `labels` (array of string)
  - `linked_knowledgebase_ids` (array of string)
  - `name` (string, required, for example "Skeptical CFO")
  - `refresh_policy` (object)
  - `response_language` (string, default ""): BCP-47 language the persona answers in; empty inherits the workspace market language.
  - `social_links` (array of object)
    - `platform` (string, required, for example "linkedin")
    - `url` (string, required, for example "https://www.linkedin.com/in/example")
  - `source_persona_id` (string, nullable): Marketplace persona this one is linked to, if any.
  - `template` (string, default ""): The persona's system prompt.
  - `tone` (string, default "")
  - `updated_at` (string, required, for example "2026-10-05T09:12:44+00:00")
  - `version` (integer, default 1)
  - `voice_profiles` (array of object)
  - `voice_visibility` (string, default "workspace"): workspace or private.
  - `workspace_id` (string, required)
  - `writing_sample_document_ids` (array of string)
- `total` (integer, required): Personas matching the filters, before limit/offset.

### Responses

- `200`: OK
- `422`: Unprocessable Entity

### Example request

```bash
curl https://api.kumkuat.ai/api/v1/personas \
  -H 'X-API-Key: <api key>'
```

### Example response

```json
{
  "limit": 0,
  "offset": 0,
  "personas": [
    {
      "avatar_source": "",
      "avatar_url": "",
      "category": "investors",
      "communication_style": "",
      "concerns": "",
      "created_at": "2026-09-29T16:40:12+00:00"
    }
  ],
  "total": 0
}
```

## Create persona

`POST /api/v1/personas`

Create a new persona template

### Request body (application/json, required)

- `avatar_prompt` (string, nullable)
- `avatar_source` (string, nullable)
- `avatar_url` (string, nullable): http(s) image URL or a data:image base64 URL.
- `category` (string, default "general", for example "investors"): Audience category; see GET /api/v1/personas/categories.
- `communication_style` (string, default "")
- `concerns` (string, default "")
- `description` (string, default ""): Who this persona is, in a sentence or two.
- `entity_kind` (string, nullable): person, organization or segment.
- `external_sources` (array of object, nullable)
- `include_in_audience` (boolean, default true)
- `include_in_voice_list` (boolean, default false)
- `instructions` (string, default ""): Behavioural instructions used when the persona reacts.
- `interests` (string, default "")
- `is_active` (boolean, default true)
- `name` (string, required, for example "Skeptical CFO"): Display name.
- `response_language` (string, nullable, for example "en"): BCP-47 language tag the persona answers in; omit to inherit the workspace market language.
- `social_links` (array of object, nullable)
  - `platform` (string, required, for example "linkedin")
  - `url` (string, required, for example "https://www.linkedin.com/in/example")
- `source_persona_id` (string, nullable): Marketplace persona to link this one to.
- `template` (string, default ""): A full system prompt; leave empty to let Kumkuat build one from the fields below.
- `tone` (string, default "")
- `voice_visibility` (string, nullable): workspace (default) or private.
- `writing_sample_document_ids` (array of string, nullable): Workspace document ids whose text defines the persona's writing voice.

### Returns (201, object)

Created

- `message` (string, default "Persona created successfully")
- `persona_id` (string, required, for example "d4e9b2a1-6c3f-4b8e-9f21-0a7c5e3d1b60")

### Responses

- `201`: Created
- `422`: Unprocessable Entity

### Example request

```bash
curl https://api.kumkuat.ai/api/v1/personas \
  -H 'X-API-Key: <api key>' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Skeptical CFO"}'
```

### Example response

```json
{
  "message": "Persona created successfully",
  "persona_id": "d4e9b2a1-6c3f-4b8e-9f21-0a7c5e3d1b60"
}
```

## Interact with persona

`POST /api/v1/personas/interact`

Put a question, a draft or a workspace document in front of one persona and get its reply. Replies take 10 to 30 seconds. For a whole audience at once use `POST /api/v1/personas/reaction-insights`.

### Request body (application/json, required)

- `context_document_ids` (array of string, nullable): Workspace documents to ground the reply on, as in a chat session with attachments.
- `document_id` (string, nullable): A workspace document to react to; its content is added to the prompt and the type defaults to analysis.
- `enable_follow_up_questions` (boolean, default false): Append suggested follow-up questions to the reply.
- `ground_with_google_search` (boolean, nullable): Let the model search the web before answering. A workspace policy (Settings → Policy → Web search in audience chat) can force this off, in which case the flag is ignored and the reply is not grounded.
- `input_content` (string, required, for example "We are moving to usage-based pricing next quarter. How does that land with you?"): What to put in front of the persona: a question, a draft, or pasted text.
- `interaction_name` (string, nullable): A label for this interaction, kept with the record.
- `interaction_type` (string, default "communication", for example "conversation"): communication (react to content), conversation (chat), analysis (reason over a document) or simulation.
- `message` (string, nullable): Legacy alias for input_content.
- `model` (string, nullable): Override the workspace's default model for this call.
- `persona_id` (string, required, for example "d4e9b2a1-6c3f-4b8e-9f21-0a7c5e3d1b60"): The persona to ask. Also accepts the persona's exact name.
- `persona_override` (object, nullable): An inline persona (name, description, tone, interests, concerns, communication_style) used instead of a stored one.
- `response_language` (string, nullable): BCP-47 tag for the reply language; defaults to the persona's, then the workspace market language.
- `voice_profile_id` (string, nullable): Answer in one of the persona's named voice profiles instead of the default.

### Returns (200, object)

OK

- `grounded_context_selection` (object, nullable): Which grounded-context items the reply carried and which were dropped for budget.
- `grounded_context_suggestion` (object, nullable): Present when the question sits off the persona's corpus and grounding would help.
- `interaction_id` (string, nullable): Id of the stored interaction; null when nothing was persisted.
- `message` (string, default "Persona interaction completed")
- `output_content` (string, nullable): The persona's reply, verbatim.
- `persona_id` (string, required)
- `persona_id_resolved_from` (string, nullable): id when persona_id matched directly, name when it was resolved from the persona's name.
- `persona_response` (string, nullable): Same as output_content.
- `response` (string, nullable): Legacy alias for persona_response.
- `response_language` (string, nullable, for example "en")
- `translation_target_language` (string, nullable)
- `translation_target_language_name` (string, nullable)

### Responses

- `200`: OK
- `422`: Unprocessable Entity

### Example request

```bash
curl https://api.kumkuat.ai/api/v1/personas/interact \
  -H 'X-API-Key: <api key>' \
  -H 'Content-Type: application/json' \
  -d '{"input_content":"We are moving to usage-based pricing next quarter. How does that land with you?","persona_id":"d4e9b2a1-6c3f-4b8e-9f21-0a7c5e3d1b60"}'
```

### Example response

```json
{
  "grounded_context_selection": {},
  "grounded_context_suggestion": {},
  "interaction_id": "string",
  "message": "Persona interaction completed",
  "output_content": "Usage-based pricing tells me you expect customers to grow into the product. Show me the cohort data before I believe the revenue line.",
  "persona_id": "string",
  "persona_id_resolved_from": "string",
  "persona_response": "string",
  "response": "string",
  "response_language": "en",
  "translation_target_language": "string",
  "translation_target_language_name": "string"
}
```

## Generate/fetch grounded 'why this matters' for a persona+document

`POST /api/v1/personas/why-it-matters`

Why this document matters to one persona: a web-grounded note with sources, cached for 7 days. `POST /api/v1/audiences/reactions` returns the same note on every reaction when its `include` lists `why_it_matters`; call this route to fetch one on its own or to regenerate it with `force_refresh`.

Requires the **Why this matters** feature, which Kumkuat enables per workspace. Without it the API returns 403.

### Request body (application/json, required)

- `document` (object, required)
  - `content` (string, nullable): The text to react to when no id is given.
  - `document_type` (string, nullable, for example "press\_release")
  - `executive` (string, nullable)
  - `id` (string, nullable): A workspace document id. Give either id, or title plus content.
  - `source_url` (string, nullable)
  - `title` (string, nullable, for example "Q3 pricing announcement")
- `force_refresh` (boolean, default false)
- `model` (string, nullable)
- `persona` (object, nullable)
  - `communication_style` (string, nullable)
  - `concerns` (string, nullable)
  - `description` (string, nullable)
  - `id` (string, nullable): A stored persona id. Omit it and pass name/description/tone to react as an inline persona.
  - `interests` (string, nullable)
  - `name` (string, nullable)
  - `tone` (string, nullable)
- `persona_id` (string, nullable): A stored persona. Alternatively pass an inline persona object.

### Returns (200, object)

OK

- `answer` (string, required): Why the document matters to this persona, grounded on current web sources and their statements.
- `cache_hit` (boolean, default false)
- `expires_at` (string, nullable)
- `generated_at` (string, nullable)
- `grounded` (boolean, required)
- `model` (string, nullable)
- `sources` (array of object): The statements and documents the answer cites.

### Responses

- `200`: OK
- `422`: Unprocessable Entity

### Example request

```bash
curl https://api.kumkuat.ai/api/v1/personas/why-it-matters \
  -H 'X-API-Key: <api key>' \
  -H 'Content-Type: application/json' \
  -d '{"document":{"content":"string","document_type":"press_release"}}'
```

### Example response

```json
{
  "answer": "string",
  "cache_hit": false,
  "expires_at": "string",
  "generated_at": "string",
  "grounded": true,
  "model": "string",
  "sources": [
    {}
  ]
}
```

## Get persona by ID

`GET /api/v1/personas/{persona_id}`

Get a specific persona template

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Returns (200, object)

OK

- `persona` (object, required)
  - `avatar_source` (string, default "")
  - `avatar_url` (string, default "")
  - `category` (string, required, for example "investors"): Audience category the persona belongs to.
  - `communication_style` (string, default "")
  - `concerns` (string, default "")
  - `created_at` (string, required, for example "2026-09-29T16:40:12+00:00")
  - `created_by` (string, default "system")
  - `default_voice_profile_id` (string, nullable)
  - `description` (string, nullable)
  - `entity_kind` (string, default ""): person, organization, segment or empty when not set.
  - `entity_kind_resolved` (string, default "")
  - `external_sources` (array of object)
  - `grounded_statements` (array of object): Statements the persona is grounded on, with their sources.
  - `health_state` (object)
  - `id` (string, required, for example "d4e9b2a1-6c3f-4b8e-9f21-0a7c5e3d1b60")
  - `include_in_audience` (boolean, default true): Whether the persona takes part in audience-wide reactions.
  - `include_in_voice_list` (boolean, default false): Whether the persona is offered as a writing voice.
  - `instructions` (string, default ""): How the persona should behave when it reacts.
  - `interests` (string, default "")
  - `is_active` (boolean, default true)
  - `is_linked_to_source` (boolean, default false)
  - `is_marketplace_managed` (boolean, nullable)
  - `labels` (array of string)
  - `linked_knowledgebase_ids` (array of string)
  - `name` (string, required, for example "Skeptical CFO")
  - `refresh_policy` (object)
  - `response_language` (string, default ""): BCP-47 language the persona answers in; empty inherits the workspace market language.
  - `social_links` (array of object)
    - `platform` (string, required, for example "linkedin")
    - `url` (string, required, for example "https://www.linkedin.com/in/example")
  - `source_persona_id` (string, nullable): Marketplace persona this one is linked to, if any.
  - `template` (string, default ""): The persona's system prompt.
  - `tone` (string, default "")
  - `updated_at` (string, required, for example "2026-10-05T09:12:44+00:00")
  - `version` (integer, default 1)
  - `voice_profiles` (array of object)
  - `voice_visibility` (string, default "workspace"): workspace or private.
  - `workspace_id` (string, required)
  - `writing_sample_document_ids` (array of string)

### Responses

- `200`: OK
- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}' \
  -H 'X-API-Key: <api key>'
```

### Example response

```json
{
  "persona": {
    "avatar_source": "",
    "avatar_url": "",
    "category": "investors",
    "communication_style": "",
    "concerns": "",
    "created_at": "2026-09-29T16:40:12+00:00"
  }
}
```

## Update persona

`PUT /api/v1/personas/{persona_id}`

Send only the fields to change.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Request body (application/json, required)

- `avatar_prompt` (string, nullable)
- `avatar_source` (string, nullable)
- `avatar_url` (string, nullable)
- `category` (string, nullable)
- `communication_style` (string, nullable)
- `concerns` (string, nullable)
- `description` (string, nullable)
- `entity_kind` (string, nullable)
- `external_sources` (array of object, nullable)
- `include_in_audience` (boolean, nullable)
- `include_in_voice_list` (boolean, nullable)
- `instructions` (string, nullable)
- `interests` (string, nullable)
- `is_active` (boolean, nullable)
- `labels` (array of string, nullable)
- `linked_knowledgebase_ids` (array of string, nullable)
- `name` (string, nullable)
- `response_language` (string, nullable)
- `social_links` (array of object, nullable)
  - `platform` (string, required, for example "linkedin")
  - `url` (string, required, for example "https://www.linkedin.com/in/example")
- `template` (string, nullable)
- `tone` (string, nullable)
- `voice_perspective` (string, nullable)
- `voice_profile` (object, nullable): Replace the default voice profile.
- `voice_visibility` (string, nullable): workspace or private.
- `writing_sample_document_ids` (array of string, nullable)

### Returns (200, object)

OK

- `message` (string, required)

### Responses

- `200`: OK
- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}' \
  -X PUT \
  -H 'X-API-Key: <api key>' \
  -H 'Content-Type: application/json' \
  -d '{"avatar_prompt":"string","avatar_source":"string"}'
```

### Example response

```json
{
  "message": "string"
}
```

## Delete persona

`DELETE /api/v1/personas/{persona_id}`

Delete a persona template

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Responses

- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}' \
  -X DELETE \
  -H 'X-API-Key: <api key>'
```

## Analyze voice from writing samples

`POST /api/v1/personas/{persona_id}/analyze-voice`

Analyze writing samples to extract a structured voice profile for a persona.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Responses

- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/analyze-voice' \
  -X POST \
  -H 'X-API-Key: <api key>'
```

## Submit persona response feedback

`POST /api/v1/personas/{persona_id}/feedback`

Submit feedback for a persona response (thumbs up/down + description).

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Request body (application/json, required)

- `description` (string, required, for example "Too eager to accept the pricing change; a CFO would ask about churn first."): What was right or wrong about the reply, up to 4000 characters. A negative note becomes a refinement the persona applies from then on.
- `feedback_type` (string, required, for example "negative"): positive or negative.
- `interaction_id` (string, nullable)
- `message_content` (string, nullable): The reply being rated, when there is no interaction id.
- `message_id` (string, nullable)
- `metadata` (object, nullable)
- `persona_mode` (string, nullable)
- `persona_name` (string, nullable)
- `session_id` (string, nullable): Chat session the reply belongs to.

### Returns (200, object)

OK

- `feedback_id` (string, required)
- `message` (string, default "Persona feedback recorded successfully")
- `refinement` (object, nullable): The refinement created from negative feedback; null otherwise.
  - `content` (string, required)
  - `created_at` (string, required)
  - `feedback_type` (string, nullable)
  - `id` (string, required)
  - `is_active` (boolean, default true)
  - `persona_id` (string, required)
  - `source` (string, default "feedback")
  - `source_feedback_id` (string, nullable)
  - `updated_at` (string, required)
  - `workspace_id` (string, required)

### Responses

- `200`: OK
- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/feedback' \
  -H 'X-API-Key: <api key>' \
  -H 'Content-Type: application/json' \
  -d '{"description":"Too eager to accept the pricing change; a CFO would ask about churn first.","feedback_type":"negative"}'
```

### Example response

```json
{
  "feedback_id": "string",
  "message": "Persona feedback recorded successfully",
  "refinement": {
    "content": "string",
    "created_at": "string",
    "feedback_type": "string",
    "id": "string",
    "is_active": true,
    "persona_id": "string"
  }
}
```

## Generate content in persona voice

`POST /api/v1/personas/{persona_id}/generate`

Write a piece in the persona's voice. The draft is saved as a workspace document.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Request body (application/json, required)

- `content_type` (string, nullable, for example "linkedin\_post"): e.g. linkedin_post, email, press_release, blog.
- `length` (string, nullable): short, medium or long.
- `reference_document_ids` (array of string, nullable): Workspace documents to draw facts from.
- `topic` (string, required, for example "Why our Q3 margin expansion is durable"): What to write about.
- `voice_profile_id` (string, nullable): Write in one of the persona's named voice profiles.

### Returns (200, object)

OK

- `content` (string, required)
- `content_type` (string, nullable)
- `document_id` (string, nullable): The draft was saved as this workspace document; null when saving failed.
- `model_used` (string, nullable)
- `truncated` (boolean, default false)
- `voice_profile_used` (object, nullable)
- `warning` (string, nullable)

### Responses

- `200`: OK
- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/generate' \
  -H 'X-API-Key: <api key>' \
  -H 'Content-Type: application/json' \
  -d '{"topic":"Why our Q3 margin expansion is durable"}'
```

### Example response

```json
{
  "content": "string",
  "content_type": "string",
  "document_id": "string",
  "model_used": "string",
  "truncated": false,
  "voice_profile_used": {},
  "warning": "string"
}
```

## Link external source to persona

`POST /api/v1/personas/{persona_id}/link-external-source`

Link an external source (e.g. a journalist's column, a blog, or a publication URL) to a persona by creating a knowledgebase with a web/RSS watcher source. If the persona already has an external-source KB, the existing one is returned.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Responses

- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/link-external-source' \
  -X POST \
  -H 'X-API-Key: <api key>'
```

## Link an uploaded file to persona

`POST /api/v1/personas/{persona_id}/link-file`

Upload a file (deck, doc, notes) and link it to a persona as a grounding source. The file is ingested into a per-persona "Linked Files" knowledgebase that is attached via linked_knowledgebase_ids, so its content grounds the persona and feeds persona refresh like watched web/social sources do.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Responses

- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/link-file' \
  -X POST \
  -H 'X-API-Key: <api key>'
```

## Link LinkedIn profile to persona

`POST /api/v1/personas/{persona_id}/link-linkedin`

Link a LinkedIn profile to a persona by creating a knowledgebase with a LinkedIn watcher source. If the persona already has a LinkedIn KB, the existing one is returned instead of creating a duplicate.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Responses

- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/link-linkedin' \
  -X POST \
  -H 'X-API-Key: <api key>'
```

## List persona refinements

`GET /api/v1/personas/{persona_id}/refinements`

List all active refinements (tuning notes) for a persona.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Responses

- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/refinements' \
  -H 'X-API-Key: <api key>'
```

## Add manual persona refinement

`POST /api/v1/personas/{persona_id}/refinements`

Manually add a refinement note to a persona profile.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Responses

- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/refinements' \
  -X POST \
  -H 'X-API-Key: <api key>'
```

## Update persona refinement

`PATCH /api/v1/personas/{persona_id}/refinements/{refinement_id}`

Update content or active state of a refinement note.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.
- `refinement_id` (string, required): Refinement id.

### Responses

- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/refinements/{refinement_id}' \
  -X PATCH \
  -H 'X-API-Key: <api key>'
```

## Delete persona refinement

`DELETE /api/v1/personas/{persona_id}/refinements/{refinement_id}`

Delete a refinement note from a persona profile.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.
- `refinement_id` (string, required): Refinement id.

### Responses

- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/refinements/{refinement_id}' \
  -X DELETE \
  -H 'X-API-Key: <api key>'
```

## Get or generate a persona summary

`GET /api/v1/personas/{persona_id}/summary`

What one persona thinks, summarised from its recent reactions.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Query parameters

- `days` (integer, default 30): Reactions from the last N days.
- `force_refresh` (boolean): Regenerate the summary.
- `model` (string): Model override.

### Returns (200, object)

OK

- `cache_hit` (boolean, required)
- `refreshing_due_to_pillars` (boolean, nullable)
- `stale` (boolean, nullable): True when a stale cached record was served while a refresh runs.
- `summary` (object, nullable): Null when there are no reactions in the window.
  - `category` (string, required): The audience category, or persona:\<id> for a single persona.
  - `filters` (object)
  - `generated_at` (string, nullable)
  - `grade` (string, nullable, for example "B")
  - `grade_trend` (string, nullable): up, down or flat.
  - `id` (string, nullable): Present on cached records.
  - `is_stale` (boolean, default false)
  - `reaction_count` (integer, default 0)
  - `status_counts` (object)
    - `bad` (integer, default 0)
    - `good` (integer, default 0)
    - `warn` (integer, default 0)
  - `summary_json` (object, required): headline, overall_sentiment, top_themes, pillar_reception, top_actions, top_risks, context, data_window.
  - `workspace_id` (string, required)

### Responses

- `200`: OK
- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/summary' \
  -H 'X-API-Key: <api key>'
```

### Example response

```json
{
  "cache_hit": true,
  "refreshing_due_to_pillars": true,
  "stale": true,
  "summary": {
    "category": "string",
    "filters": {},
    "generated_at": "string",
    "grade": "B",
    "grade_trend": "string",
    "id": "string"
  }
}
```

## Unlink an uploaded file from persona

`POST /api/v1/personas/{persona_id}/unlink-file`

Remove a linked file from a persona: detach the document from the persona's linked-files KB and soft-delete it (linked-file uploads exist only to ground this persona).

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Responses

- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/unlink-file' \
  -X POST \
  -H 'X-API-Key: <api key>'
```

## List voice profiles for a persona

`GET /api/v1/personas/{persona_id}/voice-profiles`

Return all voice profiles for a persona.

### Path parameters

- `persona_id` (string, required): Persona id, as returned by GET /api/v1/personas.

### Responses

- `422`: Unprocessable Entity

### Example request

```bash
curl --globoff 'https://api.kumkuat.ai/api/v1/personas/{persona_id}/voice-profiles' \
  -H 'X-API-Key: <api key>'
```
