Re-analyse Conversations
Queue a fresh analysis of the organisation's closed conversations started within [since, until] (at most INSIGHTS_REANALYSE_MAX_DAYS), optionally for one agent. Pre-lifecycle conversations are closed into the lifecycle first. Emits no public event, and whether each job can run (credentials, credit) is decided when it is claimed.
One call per organisation per cooldown. A refused range, agent or candidate count does not consume the cooldown; once accepted the slot is spent whatever happens to individual conversations. Each conversation commits on its own, so at most one conversation lock is held at a time; one that fails is rolled back, logged and counted as failed. A retry after the cooldown is idempotent apart from creating new generations.
The work runs on the request thread, so a call accepts at most INSIGHTS_REANALYSE_MAX_CONVERSATIONS candidates (a size that finishes inside a proxy timeout); a larger backfill is split into narrower ranges or per-agent calls, one per cooldown.
Authorization
OAuth2AuthorizationCodeBearer In: header
Query Parameters
uuidtrueRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
A re-analysis request over conversations started within [since, until]; a timestamp without a zone is read as UTC.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/insights/reanalyse?org_id=497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "since": "2019-08-24T14:15:22Z", "until": "2019-08-24T14:15:22Z" }'{ "queued": 0, "legacy_closed": 0, "skipped": 0, "failed": 0}{ "detail": [ { "loc": [ "string" ], "msg": "string", "type": "string" } ]}