> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mithunai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rename or archive a knowledge collection

> Rename, re-describe, archive or restore a collection. Sending null for a field is refused rather than treated as clearing it; send an empty string to clear one.

Every field is optional, and a field you leave out stays unchanged. A body that contains none of `name`, `description` or `archived` is refused with `400`. Sending `null` for a field is also refused with `400` rather than clearing it: to clear the description, send `""`.

Archiving retires a collection without deleting anything. An archived collection refuses new ingestion, and its documents stay searchable, so assistants that already use it keep answering from it. Send `"archived": false` to restore it. Archiving an archived collection succeeds. There is no endpoint that deletes a collection.

The embedding cannot be changed. A body that includes `embedding_model` or `embedding_dimensions` is refused with `400`, even when the value matches the current one.

Renaming onto a name your organization already uses returns `409`. Updating a collection requires a role that can manage knowledge. A read-only member receives `403`. An unknown ID, a malformed ID, or another organization's collection returns `404`.

<ParamField path="collection_id" type="string" required>
  Collection ID (a UUID).
</ParamField>

<ParamField body="name" type="string">
  New display name, at most 200 characters. It is trimmed, and a name that is empty after trimming
  is refused.
</ParamField>

<ParamField body="description" type="string">
  New description. Requests over 4,000 characters are refused. The stored value is trimmed and
  truncated to 1,000 characters.
</ParamField>

<ParamField body="archived" type="boolean">
  `true` to archive the collection, `false` to restore it.
</ParamField>

## Response

Returns `200` with the updated collection.

<ResponseField name="id" type="string" required>
  Collection ID (a UUID).
</ResponseField>

<ResponseField name="name" type="string" required>
  Display name.
</ResponseField>

<ResponseField name="description" type="string" required>
  Description.
</ResponseField>

<ResponseField name="status" type="string" required>
  `active` or `archived`.
</ResponseField>

<ResponseField name="embedding_model" type="string" required>
  Embedding model. Unchanged.
</ResponseField>

<ResponseField name="embedding_dimensions" type="integer" required>
  Vector width. Unchanged.
</ResponseField>

<ResponseField name="created_at" type="string" required>
  ISO 8601 timestamp, in UTC.
</ResponseField>

<ResponseField name="updated_at" type="string" required>
  ISO 8601 timestamp, in UTC.
</ResponseField>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl --request PATCH "$MITHUNAI_URL/arukz/api/v1/knowledge/collections/0b6f2c14-8a3d-4e91-9c77-2f5b1d0a4e88" \
    --header "Authorization: Bearer $MITHUNAI_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{"archived": true}'
  ```

  ```python Python theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os, requests

  collection_id = "0b6f2c14-8a3d-4e91-9c77-2f5b1d0a4e88"
  response = requests.patch(
      f"{os.environ['MITHUNAI_URL']}/arukz/api/v1/knowledge/collections/{collection_id}",
      headers={"Authorization": f"Bearer {os.environ['MITHUNAI_API_KEY']}"},
      json={"archived": True},
      timeout=60,
  )
  response.raise_for_status()
  print(response.json())
  ```

  ```javascript JavaScript theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const collectionId = '0b6f2c14-8a3d-4e91-9c77-2f5b1d0a4e88'
  const response = await fetch(
    `${process.env.MITHUNAI_URL}/arukz/api/v1/knowledge/collections/${collectionId}`,
    {
      method: 'PATCH',
      headers: {
        Authorization: `Bearer ${process.env.MITHUNAI_API_KEY}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({ archived: true }),
    },
  )
  console.log(await response.json())
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "id": "0b6f2c14-8a3d-4e91-9c77-2f5b1d0a4e88",
    "name": "Product documentation",
    "description": "Public docs and API reference",
    "status": "archived",
    "embedding_model": "text-embedding-3-small",
    "embedding_dimensions": 1536,
    "created_at": "2026-09-24T10:15:02.418331",
    "updated_at": "2026-09-24T14:03:57.906214"
  }
  ```

  ```json 400 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "code": "validation_error",
    "message": "A collection's embedding cannot be changed after it is created."
  }
  ```

  ```json 403 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "authorization_error", "message": "You do not have permission to perform this action." }
  ```

  ```json 404 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "not_found", "message": "The knowledge collection was not found." }
  ```

  ```json 409 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  { "code": "conflict", "message": "A knowledge collection with that name already exists." }
  ```
</ResponseExample>
