Skip to main content
Pinecone Docs

Search documentation

Type to search this documentation.

On this pageOverview

Update a vector

For guidance and examples, see Update data.

curl
# To get the unique host for an index,
# see https://docs.pinecone.io/guides/manage-data/target-an-index
PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="INDEX_HOST"

curl "https://$INDEX_HOST/vectors/update" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Pinecone-Api-Version: 2025-10" \
  -d '{
        "id": "id-3",
        "values": [4.0, 2.0],
        "setMetadata": {"type": "comedy"},
        "namespace": "example-namespace"
      }'
curl
{}

POST /vectors/update

  • X-Pinecone-Api-Version (header, string, required) — Required date-based version header
  • id (body, string) — Vector's unique id.
  • values (body, number[]) — Vector data.
  • sparseValues (body, object) — Vector sparse data. Represented as a list of indices and a list of corresponded values, which must be with the same length.
  • setMetadata (body, object) — Metadata to set for the vector.
  • namespace (body, string) — The namespace containing the vector to update.
  • filter (body, object) — A metadata filter expression. When updating metadata across records in a namespace, the update is applied to all records that match the filter. See Understanding metadata.
  • dryRun (body, boolean) — If true, return the number of records that match the filter, but do not execute the update. Default is false.
  • 200 — A successful response.
  • 400 — Bad request. The request body included invalid request parameters.
  • 4XX — An unexpected error response.
  • 5XX — An unexpected error response.
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu