Create Corpus
Provision a new knowledge base that resources can be ingested into.
Overview
Create a corpus before uploading any resources. Every corpus belongs to the authenticated user and encapsulates indexing configuration (vector index type, publication flag, etc.). Back-end logic normalizes the name into lowercase snake_case and enforces uniqueness per user.Request Body
true for shared knowledge bases.VSI- Vector Store Index (recommended for semantic search)SMI- Summary IndexDSI- Document Summary Index
PND- Pending (newly created)PRS- Processing (ingestion in progress)IND- Indexed (ready for queries)ERR- Error (ingestion failed)
Example request
Response
0.0 for new corpora, updates as resources are ingested."qdrant_free_collection"). null until first resource is indexed.VSI (Vector Store), SMI (Summary), or DSI (Document Summary).PND (Pending), PRS (Processing), IND (Indexed), or ERR (Error).Example Response
Best Practices
Check Name Availability
Check Name Availability
GET /api/check_corpora_name/?corpora_name=your_name to validate name availability before creating a corpus. This prevents 400 errors from duplicate names.Store the Corpus ID
Store the Corpus ID
id field immediately - you’ll need it for:- Uploading resources (
POST /api/data/files/,/urls/,/strings/) - Executing queries (
POST /api/query/) - Retrieving corpus details (
GET /api/corpora/{id}/)
Monitor Indexing Status
Monitor Indexing Status
indexing_status field as resources are added:PND→PRS→IND: Normal progressionERR: Check resource ingestion logs for failures
GET /api/corpora/{id}/ to monitor status changes.Understanding Read-Only Fields
Understanding Read-Only Fields
size_on_disk- Updated as resources are indexedindex_location- Assigned when first resource is processedcreator- Automatically set to your user IDid,created_at,updated_at- System-generated metadata
Client examples
- Python
- TypeScript / JavaScript
- Java
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Name of the corpora
100Description of the corpora
Is the corpora Visible to all users?
Type of index to be used for the corpora
VSI- VectorStoreIndexSMI- SummaryIndexDSI- DocumentSummaryIndex
VSI, SMI, DSI Status of the corpora processing
PND- PendingIQE- In QueuePRS- ProcessingDEX- Data Extracted SuccessfullyDER- Data Extraction ErrorIND- IndexedCMP- CompletedERR- Error
PND, IQE, PRS, DEX, DER, IND, CMP, ERR Response
The date and time the organization was created
Last updated time
Name of the corpora
100Size of the corpora on disk (in bytes)
Location of the index on Remote Storage
Description of the corpora
Is the corpora Visible to all users?
Type of index to be used for the corpora
VSI- VectorStoreIndexSMI- SummaryIndexDSI- DocumentSummaryIndex
VSI, SMI, DSI Status of the corpora processing
PND- PendingIQE- In QueuePRS- ProcessingDEX- Data Extracted SuccessfullyDER- Data Extraction ErrorIND- IndexedCMP- CompletedERR- Error
PND, IQE, PRS, DEX, DER, IND, CMP, ERR 
