Skip to main content
To delete every document in a namespace, delete the namespace.

Delete a document

DELETE /namespaces/:namespace/documents/:id
Response
A missing document returns 404 document_not_found.

Delete many

POST /namespaces/:namespace/documents/delete Deletes documents by id or by filter.
Response

Request

Send ids or filter, not both.
  • ids (array): 1-1,000 document ids. Missing ids are skipped.
  • filter (object): A metadata filter with at least one condition.

Response

  • deleted: How many documents this call deleted.
  • more: true if a filter still matches documents. A filter call deletes in batches, so send it again until more is false. The SDK’s deleteWhere does this for you.
Filter keys aren’t checked. A misspelled key matches nothing, so nothing is deleted.