---
title: "Get a node's ancestors"
method: GET
path: "/org/kb/nodes/{id}/ancestors"
tags: ["Knowledge Base"]
---

# Get a node's ancestors

`GET /org/kb/nodes/{id}/ancestors`

## Request

- Base URL: `https://apiv2.senso.ai/api/v1`
- URL: `https://apiv2.senso.ai/api/v1/org/kb/nodes/{id}/ancestors`
- Auth: API key in header `X-API-Key`

Returns the breadcrumb path from the root to the node (the node's ancestor folders).

## Path parameters

- `id` string, uuid, required

## Response `200`

The node's ancestors, root first.

- KBNodeAncestorsResponse: The breadcrumb path to a node.
  - `ancestors` KBNodeResponse[], required: The node's ancestor folders, root first.
    - `kb_node_id` string, uuid, required: Unique identifier for this document or folder. Use it in the `/org/kb/nodes/{id}/…` endpoints.
    - `org_id` string, uuid, required
    - `parent_id` string, uuid, nullable, required: The parent folder's id, or null for the root folder.
    - `content_id` string, uuid: The backing content item's id (document nodes only).
    - `type` 'folder' | 'content', required: `folder` or `content` (a document).
    - `name` string, required: Display name of the document or folder.
    - `content` KBNodeContentInfo: Content metadata for a document node.
      - `id` string, uuid, required: The content item's id.
      - `type` string, required: The content's source kind (e.g. `file`, `raw`, `web`).
      - `content_type` string: The file's MIME type (e.g. `application/pdf`, `text/markdown`).
      - `title` string
      - `summary` string
      - `version_num` integer: The current content version number.
      - `processing_status` 'pending' | 'processing' | 'complete' | 'failed': The ingestion status of the document.
      - `error_code` string: Stable classification of an ingestion failure; present only when `processing_status` is `failed`.
    - `tags` TagResponse[], required
      - `id` string, uuid, required
      - `org_id` string, uuid, required
      - `name` string, required
      - `curated` boolean, required: True = part of the org's working vocabulary; false = machine-minted (from search queries), awaiting adoption.
      - `prompt_count` integer: Prompts carrying this tag.
      - `content_count` integer: Content items carrying this tag.
      - `kb_content_count` integer: Knowledge-base nodes carrying this tag.
      - `generated_content_count` integer: Generated content carrying this tag.
      - `generated_draft_count` integer: Generated drafts carrying this tag.
      - `generated_published_count` integer: Published generated content carrying this tag.
      - `kb_search_message_count` integer: Search queries carrying this tag.
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
    - `effective_role` 'viewer' | 'editor' | 'owner' | 'admin': The caller's access level on this node — `viewer`, `editor`, `owner`, or `admin` (org-admin bypass). Absent where not computed.
    - `is_public` boolean, required: Whether the node is publicly accessible.
    - `is_public_root` boolean, required: Whether the node is the root of a public share.
    - `created_by` string, uuid: The user who created the node, if recorded.
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `400`: The request was malformed — a bad path/query parameter or an invalid value.
- `401`: Missing or invalid credentials — supply a valid org API key in the `X-API-Key` header.
- `403`: The API key is authenticated but not permitted to access this resource.
- `404`: The requested resource does not exist or is not visible to this key.

---

[API](https://skmtc.dev/senso/apis/senso-org-api.md) - [All operations](https://skmtc.dev/senso/apis/senso-org-api/llms.txt) - [OpenAPI document](https://skmtc.dev/senso/apis/senso-org-api/revisions/d789b4fcbe84?raw)
