Skip to main content
POST
Upsert fully replaces any document with the same _id, so fields you omit are removed. To change specific fields, use Update documents. If any document fails schema validation, the whole request fails and nothing is written. The namespace is created on first upsert (use __default__ if you don’t need partitioning), and documents become searchable within about a minute.

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 upsert documents into.

Body

application/json

The request for the upsert_documents operation.

documents
object[]
required

The list of documents to upsert into the namespace.

Required array length: 1 - 1000 elements

Response

The documents were successfully accepted for upsert.

The response for the upsert_documents operation.

upserted_count
integer<int32>
required

The number of documents successfully upserted.

Example:

2