Context
For instructions on how to authenticate to use this endpoint, see API overview.
Endpoints
GET | |
POST | |
GET | |
GET | |
POST | |
GET | |
GET | |
GET | |
POST |
Retrieve context layer channel pages
The organization's context wiki: a git repo of Markdown pages hosted by PostHog.
Required API key scopes
organization:readPath parameters
- channel_idstring
Response
Example request
GET /api /organizations /:organization_id /context_layer /channel-pages /:channel_idExample response
Status 200
Status 404 This channel has no page in the context wiki.
Retrieve context layer channel pages
The organization's context wiki: a git repo of Markdown pages hosted by PostHog.
Required API key scopes
organization:readPath parameters
- channel_idstring
Response
Example request
GET /api /organizations /:organization_id /context_layer /channel-pages /:channel_idExample response
Status 200
Status 404 This channel has no page in the context wiki.
Create context layer commits
The organization's context wiki: a git repo of Markdown pages hosted by PostHog.
Required API key scopes
organization:writeResponse
Example request
Example response
Status 200
Status 400
Status 409 The posted commits conflict with the current head; re-pull and retry.
Create context layer commits
The organization's context wiki: a git repo of Markdown pages hosted by PostHog.
Required API key scopes
organization:writeResponse
Example request
Example response
Status 200
Status 400
Status 409 The posted commits conflict with the current head; re-pull and retry.
List all context layer dreams
The active dreaming task, when present, plus every landed run newest first. A landed run is one merge commit dream: <date> whose body is the summary; its changes are on the detail read.
Required API key scopes
organization:readResponse
Example request
GET /api /organizations /:organization_id /context_layer /dreamsExample response
Status 200
Status 404 The context layer is not enabled.
List all context layer dreams
The active dreaming task, when present, plus every landed run newest first. A landed run is one merge commit dream: <date> whose body is the summary; its changes are on the detail read.
Required API key scopes
organization:readResponse
Example request
GET /api /organizations /:organization_id /context_layer /dreamsExample response
Status 200
Status 404 The context layer is not enabled.
Retrieve context layer dreams
One dreaming run with the per-file unified patches it landed.
Required API key scopes
organization:readPath parameters
- shastring
Response
Example request
GET /api /organizations /:organization_id /context_layer /dreams /:shaExample response
Status 200
Status 404 No dream run at this sha, or the context layer is not enabled.
Retrieve context layer dreams
One dreaming run with the per-file unified patches it landed.
Required API key scopes
organization:readPath parameters
- shastring
Response
Example request
GET /api /organizations /:organization_id /context_layer /dreams /:shaExample response
Status 200
Status 404 No dream run at this sha, or the context layer is not enabled.
Create context layer enable
Create the organization's wiki with the default structure and import existing channel CONTEXT.md documents once. Idempotent.
Required API key scopes
organization:writeResponse
Example request
POST /api /organizations /:organization_id /context_layer /enableExample response
Status 201
Create context layer enable
Create the organization's wiki with the default structure and import existing channel CONTEXT.md documents once. Idempotent.
Required API key scopes
organization:writeResponse
Example request
POST /api /organizations /:organization_id /context_layer /enableExample response
Status 201
Retrieve context layer export
A short-lived download URL for the wiki's current bundle: the whole repo and its history, one file, standard git.
Required API key scopes
organization:readResponse
Example request
GET /api /organizations /:organization_id /context_layer /exportExample response
Status 200
Retrieve context layer export
A short-lived download URL for the wiki's current bundle: the whole repo and its history, one file, standard git.
Required API key scopes
organization:readResponse
Example request
GET /api /organizations /:organization_id /context_layer /exportExample response
Status 200
Retrieve context layer pages
The organization's context wiki: a git repo of Markdown pages hosted by PostHog.
Required API key scopes
organization:readQuery parameters
- head_shastring
- limitinteger
- offsetintegerDefault:
0 - pathstring
Response
Example request
GET /api /organizations /:organization_id /context_layer /pagesExample response
Status 200
Status 400 Invalid query, or the offset exceeds the page length.
Status 404 No page at this path.
Status 409 The wiki changed. Restart from offset zero.
Retrieve context layer pages
The organization's context wiki: a git repo of Markdown pages hosted by PostHog.
Required API key scopes
organization:readQuery parameters
- head_shastring
- limitinteger
- offsetintegerDefault:
0 - pathstring
Response
Example request
GET /api /organizations /:organization_id /context_layer /pagesExample response
Status 200
Status 400 Invalid query, or the offset exceeds the page length.
Status 404 No page at this path.
Status 409 The wiki changed. Restart from offset zero.
List all context layer proposals
The organization's context wiki: a git repo of Markdown pages hosted by PostHog.
Required API key scopes
organization:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /organizations /:organization_id /context_layer /proposalsExample response
Status 200
List all context layer proposals
The organization's context wiki: a git repo of Markdown pages hosted by PostHog.
Required API key scopes
organization:readQuery parameters
- limitinteger
- offsetinteger
Response
Example request
GET /api /organizations /:organization_id /context_layer /proposalsExample response
Status 200
Create context layer proposals apply
The organization's context wiki: a git repo of Markdown pages hosted by PostHog.
Required API key scopes
organization:writePath parameters
- proposal_idstring
Response
Example request
POST /api /organizations /:organization_id /context_layer /proposals /:proposal_id /applyExample response
Status 200
Status 400
Status 409
Create context layer proposals apply
The organization's context wiki: a git repo of Markdown pages hosted by PostHog.
Required API key scopes
organization:writePath parameters
- proposal_idstring
Response
Example request
POST /api /organizations /:organization_id /context_layer /proposals /:proposal_id /apply










