---
title: "Rename a knowledge base"
method: PATCH
path: "/v1/knowledgebases/{id}"
tags: ["Knowledge Bases"]
---

# Rename a knowledge base

`PATCH /v1/knowledgebases/{id}`

## Request

- Base URL: `https://api.pyai.com`
- URL: `https://api.pyai.com/v1/knowledgebases/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string, required

## Response `200`

Updated knowledge base

- Knowledgebase
  - `id` string
  - `orgId` string
  - `name` string
  - `embedModel` string
  - `docCount` integer
  - `bytes` integer
  - `status` 'active' | 'deleted'
  - `createdAt` integer: Unix ms.

## Other responses

- `404`: Resource not found (`code: not_found`)
- `409`: Name already in use in this organization.

---

[API](https://skmtc.dev/pyai/apis/pyai-api.md) · [All operations](https://skmtc.dev/pyai/apis/pyai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pyai/apis/pyai-api/revisions/819d8e7c4d09?raw)
