---
title: "Rename a node"
method: PATCH
path: "/org/kb/nodes/{id}/rename"
tags: ["Knowledge Base"]
---

# Rename a node

`PATCH /org/kb/nodes/{id}/rename`

## Request

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

Changes a knowledge-base node's name.

## Path parameters

- `id` string, uuid, required

## Request body

- RenameKBNodeRequest
  - `name` string, required: The new name.

## Response `200`

The renamed node.

- KBNodeResponse: A knowledge-base node — a folder or a document. `content` and `content_id` appear only on document nodes (`type: content`); folders, including the root, never carry them. `effective_role` is included by the single-node and listing reads but not by `GET /org/kb/root` or the ancestors read.
  - `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 body was invalid — either it failed field validation (`ValidationErrorResponse`) or was otherwise malformed (`ErrorResponse`).
- `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)
