Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ivory.finance/llms.txt

Use this file to discover all available pages before exploring further.

Overview

DELETE /v1/documents/{doc_id} removes all indexed chunks for a document from your tenant’s OpenSearch index. The deletion is scoped exclusively to your tenant’s index — no wildcard across other tenants.
Deletion is permanent and immediate. All indexed chunks are removed and the document becomes unsearchable. There is no soft-delete or recovery.

Path parameter

doc_id
string
required
The document UUID returned by POST /v1/documents/upload.

Query parameter

tenant_id
string
required
Your tenant UUID. Scopes the delete to your index only.

Response

doc_id
string
The deleted document UUID.
deleted_chunks
integer
Number of chunks removed from the index.
status
string
deleted

Examples

curl -X DELETE \
  "https://api.ivory.finance/v1/documents/3f7a2b1c-4e8d-4a9f-b2c1-d3e4f5a6b7c8?tenant_id=a1b2c3d4-5e6f-7890-abcd-ef1234567890" \
  -H "X-API-Key: YOUR_KEY"
Response:
{
  "doc_id":         "3f7a2b1c-4e8d-4a9f-b2c1-d3e4f5a6b7c8",
  "deleted_chunks": 63,
  "status":         "deleted"
}

Error responses

CodeReason
404Document not found in this tenant’s index
503Document index not provisioned for this tenant