Update a vector
Update a vector in a namespace. If a value is included, it will overwrite the previous value. If a set_metadata is included, the values of the fields specified in it will be added or overwrite the previous value.
For guidance and examples, see Update data.
# 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"
}'{}POST /vectors/update
Authorizations
Section titled “Authorizations”Api-KeystringrequiredAn API Key is required to call Pinecone APIs. Get yours from the console.
Headers
Section titled “Headers”X-Pinecone-Api-VersionstringrequiredRequired date-based version header
id?stringVector's unique id.
Required string length: 1 - 512. Example: example-vector-1
values?number[]Vector data.
Required string length: 1 - 20000
sparseValues?objectVector sparse data. Represented as a list of indices and a list of corresponded values, which must be with the same length.
Show child attributes
indicesinteger[]requiredThe indices of the sparse data.
Required string length: 1 - 1000
valuesnumber[]requiredThe corresponding values of the sparse data, which must be with the same length as the indices.
Required string length: 1 - 1000
setMetadata?objectMetadata to set for the vector.
namespace?stringThe namespace containing the vector to update.
Example: example-namespace
filter?objectA 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?booleanIf true, return the number of records that match the filter, but do not execute the update. Default is false.
Example: false
Response
Section titled “Response”200 — A successful response.
The response for the update operation.
matchedRecords?integerThe number of records that matched the filter (if a filter was provided).
Example: 42