---
title: "Get the latest context document tree"
method: GET
path: "/context-documents/tree/latest"
tags: ["Context Documents"]
---

# Get the latest context document tree

`GET /context-documents/tree/latest`

Get the most recent context document tree for the authenticated app.

The sync daemon polls this endpoint to fetch updated files. Default
behaviour: serve the latest "ready" tree, where "ready" depends on
whether the app has `require_review` enabled:

- `require_review=False` (default): latest COMPLETED ships immediately.
- `require_review=True`: latest PUBLISHED only — apps that gate on a
  curator's approval before the daemon picks up the new tree.

`?status=<value>` filters to a specific status (case-insensitive).
`?include_published=true` returns the absolute latest tree (any status)
so the dashboard can surface an in-flight PROCESSING generation when
the user navigates away mid-gen and back. The daemon path (no
`include_published`) keeps strict status filtering.

## Query parameters

- `status` string, nullable
- `include_published` boolean

## Response `200`

Successful Response

- TreeResponse
  - `tree_id` string, required
  - `status` string, required
  - `version` integer, required
  - `files` TreeFile[], nullable, required
    - `path` string, required
    - `content` string, required
    - `tier` string, required
    - `team` string, nullable, required
    - `updated_at` string, required
  - `error` string, nullable, required
  - `created_at` string, date-time, required
  - `completed_at` string, date-time, nullable, required
  - `meta` object, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-05-13** `0583e3fa4b98` — 1 info
  - added the new optional `query` request parameter `include_published`
- **2026-04-22** `a4bf4f3aaf15` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/hyperspell/apis/hyperspell-api/changes/context-documents/tree/latest/get.md)

---

[API](https://skmtc.dev/hyperspell/apis/hyperspell-api.md) · [All operations](https://skmtc.dev/hyperspell/apis/hyperspell-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hyperspell/hyperspell-api/revisions/d7c846c2cd79/schema)
