Esc
ZeroIndex
GuidesAPI referenceSDKsChangelogOverviewBuy ZeroIndex

Delete a document

View as MarkdownThe page as plain text

Remove one document from an index by its primary key.

DELETE/v1/indexes/{uid}/documents/{id}

Deleting a document that does not exist still succeeds, so you can safely retry. Requires an admin key.

Path parameters

uidstringrequired

The name of the index.

idstring | integerrequired

The primary key of the document to delete.

Request

curl -X DELETE https://api.zeroindex.test/v1/indexes/products/documents/1042 \
  -H "Authorization: Bearer $ZEROINDEX_KEY"
const task = await client.index("products").deleteDocument(1042);
task = client.index("products").delete_document(1042)

Response

202
{
  "taskUid": 8820,
  "indexUid": "products",
  "status": "enqueued",
  "type": "documentDeletion",
  "enqueuedAt": "2026-10-14T10:02:18Z"
}