Delete a document
# Delete a document
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
<ParamField name="uid" type="string" required>
The name of the index.
</ParamField>
<ParamField name="id" type="string | integer" required>
The primary key of the document to delete.
</ParamField>
<Callout type="note">
To delete many documents at once, send `POST /v1/indexes/{uid}/documents/delete` with a list of ids or a filter.
</Callout>
## Request
```bash
curl -X DELETE https://api.zeroindex.test/v1/indexes/products/documents/1042 \
-H "Authorization: Bearer $ZEROINDEX_KEY"
```
```js
const task = await client.index("products").deleteDocument(1042);
```
```python
task = client.index("products").delete_document(1042)
```
## Response (202)
```json
{
"taskUid": 8820,
"indexUid": "products",
"status": "enqueued",
"type": "documentDeletion",
"enqueuedAt": "2026-10-14T10:02:18Z"
}
```
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"
}