Skip to content

Delete Document

Removes a document from the index or indexing queue.

Endpoint

DELETE /delete

Query Parameters

Parameter Type Description
doc_id string The unique identifier of the document to be deleted.

Usage

{
  "doc_id": "doc_123"
}
The doc_id parameter specifies the unique identifier of the document to be deleted.

Response

Field Type Description
status string The result of the delete operation.
message string Additional information about the operation (only present for "Error" status).

Possible status values

Status Description
Success Document was successfully deleted
Error Document could not be deleted

Example Response (Success)

{
  "status": "Success"
}

Example Response (Error)

{
  "status": "Error",
  "message": "Document not found"
}

Error Responses

  • 400 Bad Request: Invalid input data
  • Example: Invalid document ID format
  • 401 Unauthorized: Missing or invalid API key
  • 404 Not Found: Document not found in index or queue
  • 429 Too Many Requests: Rate limit exceeded

This endpoint allows you to remove a document from the index or the indexing queue. It's useful for managing your indexed content, removing outdated documents, or cancelling pending index operations.

Use Cases

  1. Removing Outdated Content: Delete documents that are no longer relevant or have been removed from your primary data source.
  2. Compliance and Data Privacy: Remove documents that no longer comply with data retention policies or user privacy requests.

Important Notes

  • Deleting a document is permanent and cannot be undone. Make sure you have a backup if needed.
  • If you delete a document that is currently in the processing state, it may take a short time for the deletion to be fully processed.
  • Deleting a document removes it from both the search index and the indexing queue (if applicable).
  • After deleting a document, any search queries that would have returned that document will no longer include it in the results.