---
title: "Create or update a collection."
method: POST
path: "/collections"
---

# Create or update a collection.

`POST /collections`

## Request body

- CollectionRequest
  - `id` string
  - `name` string
  - `description` string
  - `image` string
  - `privacy` 'public' | 'private' | 'team'
  - `knowledgeBase` string — A list of URLs (one per row) to add to the collection. YouTube URLs will be transcripted. Use links(url) to index the direct links at url.

## Response `200`

The result of the collection creation or update.

- CollectionResponse
  - `ok` boolean
  - `collectionId` string

## Other responses

- `400` — Invalid request.
- `403` — Exceeded collection allowance.

---

[API](https://skmtc.net/openindex/apis/openindex-ai-api.md) · [All operations](https://skmtc.net/openindex/apis/openindex-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openindex/openindex-ai-api/versions/c3a8b22ba407/schema)
