Data Operations
Delete Data
Delete specific documents or vectors from a namespace by providing their IDs.
POST
Overview
Delete specific documents or vectors from a namespace by providing their IDs. Use the documents endpoint for text data and vectors endpoint for vector data. Both operations are permanent and decrement your total item count.Endpoints
- Documents:
POST /namespaces/{namespace_name}/documents/delete- Delete text documents from namespace - Vectors:
POST /namespaces/{namespace_name}/vectors/delete- Delete vector embeddings from namespace
Authentication
Your API key for authentication
Must be
application/jsonPath Parameters
Name of the namespace containing the data to delete
Body Parameters
Array of item IDs to delete (max 1000 items per request). Numbers will be converted to strings.
Response Fields
Success Response (200)
Always “success” for 200 responses
Human-readable confirmation message with deletion counts
Number of items requested to be deleted
Number of items actually deleted
Total number of items remaining in namespace after deletion
List of item IDs that were requested to be deleted
Partial Success Response (207)
“partial” for 207 responses
IDs of items that failed to be deleted
Important Notes
- Maximum of 1,000 IDs can be deleted in a single request
- IDs can be strings or numbers - they’ll be converted to strings internally
- This operation permanently deletes data and cannot be undone
- Successfully deleted items will decrement your total item count
- Use the correct endpoint: documents/delete for text data, vectors/delete for vector data
- Both endpoints use POST method (not DELETE) for security and payload reasons
- Namespace must exist and belong to your account
- The API uses batch deletion for efficient processing
Understanding Responses
- 200 Response: No items failed to process (no unprocessed items)
- 207 Response: Some items were successfully deleted while others failed
- Check
actual_deletionsvsrequested_deletionsto see if items were found - If
actual_deletionsis 0, the requested IDs may not exist in the namespace - The
remaining_itemscount reflects the current namespace size
Use Cases
- Data Cleanup: Remove outdated or temporary documents/vectors
- Content Management: Delete specific items by ID
- Privacy Compliance: Remove specific user data
- Storage Management: Free up space by removing unused content
- Testing: Clean specific test data between runs
Related Endpoints
- Get Documents - Retrieve documents before deletion
- Upload Text Data - Add new text documents
- Upload Vector Data - Add new vector data
- List Namespaces - View namespace information