POST/vector_stores/{vector_store_id}

Update a vector store

Updates a vector store's name, expiration policy, or metadata. Provide only the properties you want to change; omitted properties are not part of the update.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 3 body fields
vector_store_idstringrequired
The ID of the vector store to modify.

Properties to update on the vector store. All fields are optional.

namestringoptional
The name of the vector store.
expires_afterobjectoptional
The expiration policy for the vector store.
metadataobjectoptional
Key-value metadata to attach to the vector store, or `null` to clear it. Supports up to 16 key-value pairs with keys up to 64 characters and string values.

5 status codes
200Returns the updated vector store, including its current name, status, expiration details, and metadata.
idstringrequired
The identifier, which can be referenced in API endpoints.
objectstringrequired
The object type, which is always `vector_store`.
Allowed:vector_store
created_atintegerrequired
The Unix timestamp (in seconds) for when the vector store was created.
namestringrequired
The name of the vector store.
usage_bytesintegerrequired
The total number of bytes used by the files in the vector store.
file_countsobjectrequired
statusstringrequired
The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.
Allowed:expiredin_progresscompleted
expires_afterobjectoptional
The expiration policy for a vector store.
expires_atintegeroptional
The Unix timestamp (in seconds) for when the vector store will expire.
last_active_atintegerrequired
The Unix timestamp (in seconds) for when the vector store was last active.
metadataobjectrequired
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
400Returned when the input is invalid, the vector store has expired, or the store cannot be modified.
errorobjectrequired
403Returned when the caller is not authorized to update the vector store.
errorobjectrequired
404Returned when the vector store was not found.
errorobjectrequired
429Returned when the request rate limit is exceeded.
errorobjectrequired

Error handling

A 400 is returned when the input is invalid, the store has expired, or it cannot be modified; a 403 is returned when the caller is not authorized to update it. A 404 is returned when the vector store is not found, and a 429 is returned when the request rate limit is exceeded. The vector_store_id path parameter must identify the store; metadata supports up to 16 key-value pairs with keys up to 64 characters.