---
title: "Create Document Collection"
method: POST
path: "/rag/collections/"
tags: ["rag"]
---

# Create Document Collection

`POST /rag/collections/`

Create a new document collection from uploaded files and metadata

## Response `200`

Successful Response

- DocumentCollectionResponseSchema — Response model for document collection operations
  - `id` string, required
  - `name` string, required
  - `description` string, nullable
  - `status` string, required
  - `created_at` string, required
  - `updated_at` string, required
  - `document_count` integer, required
  - `chunk_count` integer, required
  - `error_message` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2025-03-12** `181efcea9e6e` — 1 info
  - endpoint added
- **2024-11-23** `a2d864f3a8db` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/pyspur-dev/apis/pyspur-api/changes/rag/collections/post.md)

---

[API](https://skmtc.dev/pyspur-dev/apis/pyspur-api.md) · [All operations](https://skmtc.dev/pyspur-dev/apis/pyspur-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pyspur-dev/pyspur-api/revisions/adc77484c851/schema)
