Skip to main content
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.
This operation permanently deletes data and cannot be undone. Deleted items will 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

string
required
Your API key for authentication
string
required
Must be application/json

Path Parameters

string
required
Name of the namespace containing the data to delete

Body Parameters

array
required
Array of item IDs to delete (max 1000 items per request). Numbers will be converted to strings.

Response Fields

Success Response (200)

string
Always “success” for 200 responses
string
Human-readable confirmation message with deletion counts
number
Number of items requested to be deleted
number
Number of items actually deleted
number
Total number of items remaining in namespace after deletion
array
List of item IDs that were requested to be deleted

Partial Success Response (207)

string
“partial” for 207 responses
array
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_deletions vs requested_deletions to see if items were found
  • If actual_deletions is 0, the requested IDs may not exist in the namespace
  • The remaining_items count 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