Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hc.pillargtm.com/llms.txt

Use this file to discover all available pages before exploring further.

Narratives API

The Narratives API generates board-ready narrative documents using Claude. It assembles data from across the PILLAR platform, constructs a structured prompt with pre-computed KPIs, and returns a multi-section narrative with prose content, data points, and severity indicators.

POST /api/narratives/generate

Generates a new board narrative and persists it to the database. Auth: Requires authenticated session. Scoped to organization.

Request Body

FieldTypeRequiredDefaultDescription
narrativeTypestringYesType of narrative to generate
periodstringYesPeriod identifier (e.g. 2026-Q1)
includeRecommendationsbooleanNotrueInclude strategic recommendations section
tonestringNoboard_formalWriting tone

Valid narrativeType Values

ValueGenerated Title
executive_summaryExecutive Summary
quarterly_reviewQuarterly Business Review
renewal_forecastRenewal Forecast & Retention Analysis
territory_healthTerritory Health & Coverage Report
pipeline_updatePipeline & Growth Update

Valid tone Values

ValueStyle
board_formalAuthoritative third person, precise language
exec_concisePunchy, direct, action-oriented
detailed_analyticalThorough, data-rich, clear reasoning chains

Response

FieldTypeDescription
narrativeobjectGenerated narrative

Response Fields: narrative

FieldTypeDescription
idstringNarrative UUID
titlestringGenerated title (e.g. “Executive Summary — 2026-Q1”)
narrativeTypestringNarrative type
periodstringPeriod
sectionsarrayNarrative sections
generatedAtstringISO timestamp
modelVersionstringClaude model version used
tonestringTone used

Response Fields: sections[]

FieldTypeDescription
headingstringSection title
contentstringMarkdown prose content (2-4 paragraphs)
dataPointsarrayKey metrics: [{label, value, trend}]
severitystringpositive, neutral, caution, critical
TrendMeaning
upMetric increasing
downMetric decreasing
flatNo significant change

Side Effects

  • Assembles a complete data bundle from accounts, renewals, signals, plays, territories, org metrics, and blueprint assessments
  • Calls the Anthropic Claude API to generate narrative content
  • Saves the narrative with the full data snapshot for auditability

Error Handling

StatusCondition
400Invalid narrativeType, missing period, or invalid tone
401Not authenticated
500Generation failure or API error (returns error message in body)
See the Board Narratives data model page for full details on narrative types, data assembly, and the pre-computed KPI system.