# Update Collection

PUT /api/v2/projects/{projectId}/knowledge/collections/{id}

Updates a collection's name, description, icon, or position. Only the fields present in the body are written. Re-parent it by setting `parentId`, keeping within the 3-level nesting limit. `icon` accepts a Lucide name, an emoji, or a storage URL; `iconImage` uploads an image file and stores the resulting storage URL.

## Request

- projectId: string, path, required — ID of the project that owns the collection.
- id: string, path, required — ID of the collection to update.
- description: string
- helpCenterId: string
- icon: string — Lucide icon name (for example book-open), an emoji, or a public storage URL (https://storage.saasco.com/...). Send iconImage to upload an image file instead.
- iconImage: object — Image file to upload as the collection icon, using the same project image upload as the product icon picker. The stored icon becomes the public storage URL. When set, this replaces icon.
  - contentType: string, required — Image MIME type, for example image/png or image/svg+xml.
  - dataBase64: string, required — Base64-encoded image bytes. A data: URL is also accepted.
  - fileName: string — File name including the extension, for example analytics.svg.
- name: string
- order: integer
- parentId: string
- url: string

## Response

- 200: Successful response
  - createdAt: string, required
  - helpCenterId: string, required
  - id: string, required
  - name: string, required
  - order: integer, required
  - projectId: string, required
  - updatedAt: string, required
  - description: string
  - icon: string
  - parentId: string
  - url: string
- 400: Invalid input data
- 401: Authorization not provided
- 403: Insufficient access
- 404: Not found
- 500: Internal server error
