Skip to main content
POST

Authorizations

Api-Key
string
header
required

An API Key is required to call Pinecone APIs. Get yours from the console.

Headers

X-Pinecone-Api-Version
string
default:2026-07
required

Required date-based version header

Path Parameters

namespace
string
required

The namespace to delete documents from.

Body

application/json

The request for the delete_documents operation. Exactly one of ids, filter, or delete_all must be specified.

ids
string[]
required

A list of document IDs to delete. Mutually exclusive with filter and delete_all.

Required array length: 1 - 1000 elements
Required string length: 1 - 512
Pattern: ^[\x01-\x7F]+$
delete_all
enum<boolean>

If true, delete all documents in the namespace. Mutually exclusive with ids and filter. false is treated as if the field were omitted.

Available options:
false
filter
object

A metadata filter expression selecting the documents to delete. Must not be empty; an empty filter is rejected rather than matching every document. To delete every document in the namespace, set delete_all. Text-match operators ($match_phrase, $match_all, $match_any) are not supported here, since documents are selected on metadata alone. Mutually exclusive with ids and delete_all.

Example:

Response

The delete request was successfully accepted.

The response for the delete_documents operation.

matched_records
integer<int32>

The number of documents that matched filter when the delete was accepted. Only returned for a filtered delete, and omitted when the count could not be read in time; 0 means the filter matched no documents. The delete is applied asynchronously, so this is a point-in-time count rather than a guarantee of the number of documents ultimately deleted.

Example:

42