---
title: "Rename Collection Api"
method: PUT
path: "/api/kb/collections/{collection_name}"
tags: ["kb"]
---

# Rename Collection Api

`PUT /api/kb/collections/{collection_name}`

Rename a collection.

Args:
    collection_name: Current collection name
    new_name: New collection name

Returns:
    Success message

## Path parameters

- `collection_name` string, required

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/xorbitsai/apis/xagent.md) · [All operations](https://skmtc.net/xorbitsai/apis/xagent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xorbitsai/xagent/revisions/33e4ba4936ad/schema)
