JavaScript
Corpus Management
Delete Corpus
Remove a corpus, its index metadata, and all nested resources you own.
DELETE
JavaScript
Overview
Permanently delete a corpus and all its associated resources. This operation cascades through all files, strings, URLs, and social media imports, removing storage objects and vector embeddings from Qdrant.Authentication
Requires valid JWT token or session authentication. You must own the target corpus.Path Parameters
UUID
required
Identifier of the corpus to delete.Example:
8d0f0a5d-4b5e-4c09-9db6-0e9d2aa8a9fdExample request
Response Codes
No Content
Deletion successful. No response body is returned.
Forbidden
The corpus belongs to another user. Cannot delete corpora you don’t own.
Not Found
Corpus doesn’t exist or you don’t have access to it.
Conflict
Backend failed to remove remote index or storage objects. Retry once and contact support if the issue persists.Possible causes:
- Vector database connection timeout
- Storage service unavailable
- Partial deletion occurred
What Gets Deleted
The delete operation removes:- Corpus metadata - Name, description, settings
- All resources - Files, strings, URLs, social media imports
- Storage objects - Uploaded files and processed content
- Vector embeddings - All chunks removed from Qdrant
- Query history - All past queries and retrievals for this corpus
- Index data - Vector database collections and metadata
Safe Deletion Workflow
Pre-Deletion Checklist
Pre-Deletion Checklist
Verify what will be deleted before proceeding:
Backup Before Deletion
Backup Before Deletion
Export data before permanent deletion:
Alternative: Soft Delete
Alternative: Soft Delete
Instead of deleting, make the corpus private and add an archive marker:Benefits:
- Reversible operation
- Data preserved for future reference
- Can restore if needed
- Maintains audit trail
Handling Deletion Failures
Handling Deletion Failures
Handle 409 errors gracefully:
Batch Deletion
Batch Deletion
Delete multiple corpora safely:
Security: Deletion requests for corpora owned by other users return
403 Forbidden without revealing whether the corpus exists.Client examples
- Python
- TypeScript / JavaScript
- Java

