Skip to main content
POST
Topic treemap and per-topic daily series for the active agency.

Authorizations

X-CB-KEY
string
header
required

CloseBot API Key Authorization

Body

start
string<date-time>
required

Inclusive UTC start. Unlike /analytics/query this is day-grained, so no 15-minute alignment.

end
string<date-time>
required

Inclusive UTC end.

limit
integer<int32> | null

Largest topics first; the rest are dropped. Capped at 50.

filters
object

Response

OK

topics
object[] | null
required
analyzedConversations
integer<int32>
required

Distinct conversations with at least one topic in range.

pendingConversations
integer<int32>
required

Conversations on topic-enabled sources that have never been classified, agency-wide.

Deliberately not scoped to the requested range. A range-scoped backlog would need each unanalysed conversation's start date, which means MIN(Message.Time) per lead — the scan of the Messages table that this feature's whole design avoids. An agency-wide number is cheap, and the UI must label it as such rather than implying a percentage.

sentimentCoverage
number<double>
required

Share of Closebot.Api.Controllers.AnalyticsController.TopicsQueryResponse.AnalyzedConversations carrying a sentiment reading, 0-1. Below 1 means some sources have Sentiment switched off.

oldestAnalyzedOn
string<date> | null

Earliest conversation start date with any topic, agency-wide. Lets the UI say "topics from 3 Mar" so the forward-only cutover reads as a cutover and not a data gap.