Skip to main content
POST
Generate a three-tier context document tree

Authorizations

Authorization
string
header
required

API Key or JWT User Token. If using an API Key, set the X-As-User header to act as a specific user. A JWT User Token is always scoped to a specific user.

Body

application/json

Request body for POST /context-documents/tree.

sources
string[] | null

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

user_id
string | null

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_name
string | null

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

Response

Successful Response

tree_id
string
required
status
string
required
created_at
string<date-time>
required