Skip to main content
DELETE
JavaScript

Overview

Permanently delete a file resource along with its stored binary, metadata, and all derived vector embeddings. This immediately removes the file’s content from search results and retrieval operations.
Irreversible: Deletion cannot be undone. The file, its storage blob, and all vector embeddings are permanently removed.
Use cases: Removing outdated documentation, retracting superseded content, managing storage costs, or complying with data deletion requests.

Authentication

Requires valid JWT token or session authentication. You must own the parent corpus.

Path Parameters

UUID
required
File resource identifier. Must belong to a corpus you own.Example: 0f75c73e-91bb-4e2b-9ff2-6820a8636ad8

Example request

Response Codes

No Content
File successfully deleted. No response body returned.
Not Found
File does not exist or belongs to a corpus you don’t own.
Conflict
Backend could not delete the storage blob or vector embeddings. Retry usually succeeds once the storage subsystem catches up.Common causes:
  • Storage service temporarily unavailable
  • Vector database connection timeout
  • Concurrent deletion attempt

What Gets Deleted

  • File record - Database entry with metadata
  • Storage blob - Actual file binary in cloud/local storage
  • Vector embeddings - All chunks removed from Qdrant
  • Indexing metadata - Processing status and timestamps
Immediate effect: Deletion prevents the file from appearing in future retrievals. Vector embeddings are removed before the database record is deleted.

Common Use Cases

Check file details before permanently deleting:
Remove multiple files efficiently:
Remove old version before uploading new:
Best practice: Track file versions by naming convention or metadata to easily identify and replace outdated content.
Implement retry logic for 409 errors:
Instead of deleting, move files to an archive corpus:
Benefits:
  • Preserves data for potential future use
  • Maintains audit trail
  • Can restore if needed
Storage optimization: Regular cleanup of obsolete files reduces storage costs and improves corpus query performance.

Client examples

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

A UUID string identifying this File.

Response

204

No response body