Context Documents

Generate a tree via Temporal (parallel endpoint for A/B comparison)

Same contract as POST /context-documents/tree but always dispatches via Temporal — no PostHog flag, no legacy fallback.

Exists so the legacy and Temporal paths can be exercised side-by-side against the same app data and their outputs compared. The progress endpoint (GET /context-documents/tree/{tree_id}/progress) works for both since both write to the same ContextDocTree table.

post/context-documents/tree-temporal

Request body

sourcesstring[] nullable

Integration sources to include (e.g., ['gmail', 'slack']). Defaults to all.

user_idstring nullable

User ID for personal tier scoping. When set, personal/context.md is generated from this user's data only. Company and workstream tiers still use all data.

workstream_namestring nullable

Generate docs for this workstream only (skip auto-detection).

Response

Successful Response

tree_idstring required
statusstring required
created_atstring date-time required

Changes