Skip to content

Scan Document

POST
/api/writing/insights/scan

Trigger a full insight scan for a document.

Routes through DivinityExecutor / :class:InsightsScanHandler after Phase A12 of the M15 migration; the legacy direct-service fallback was retired with the LLM provider stack.

InsightScanRequest

POST /api/creative/writing/insights/scan.

object
documentId
required
Documentid
string

Successful Response

InsightsResponse

GET /api/creative/writing/insights.

object
insights
required
Insights
Array<object>
Insight

One proactive insight surfaced by the insight service.

object
id
required
Id
string
insightType
required
InsightType

Categories of proactive insight.

string
Allowed values: lore_gap unlinked_ref completeness consistency
severity
required
Severity
string
Allowed values: info warning
title
required
Title
string
description
required
Description
string
sourceDocumentId
Any of:
string
loreEntryId
Any of:
string
entityName
Any of:
string
action
required
InsightAction

Single actionable resolution for an insight.

object
label
required
Label
string
actionType
required
InsightActionType

What the user can do to resolve an insight.

string
Allowed values: open_lore create_lore open_hawken
targetId
Any of:
string
scannedAt
Any of:
string

Validation Error

HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object