---
title: "Modifies a vector store."
method: POST
path: "/vector_stores/{vector_store_id}"
tags: ["Vector stores"]
---

# Modifies a vector store.

`POST /vector_stores/{vector_store_id}`

## Path parameters

- `vector_store_id` string, required

## Request body

- UpdateVectorStoreRequest
  - `name` string, nullable — The name of the vector store.
  - `expires_after` object, nullable — The expiration policy for a vector store.
    - `anchor` 'last_active_at', required — Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.
    - `days` integer, required — The number of days after the anchor time that the vector store will expire.
  - `metadata` Metadata, nullable — 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.

## Response `200`

OK

- VectorStoreObject — A vector store is a collection of processed files can be used by the `file_search` tool.
  - `id` string, required — The identifier, which can be referenced in API endpoints.
  - `object` 'vector_store', required — The object type, which is always `vector_store`.
  - `created_at` integer, required — The Unix timestamp (in seconds) for when the vector store was created.
  - `name` string, required — The name of the vector store.
  - `usage_bytes` integer, required — The total number of bytes used by the files in the vector store.
  - `file_counts` object, required
    - `in_progress` integer, required — The number of files that are currently being processed.
    - `completed` integer, required — The number of files that have been successfully processed.
    - `failed` integer, required — The number of files that have failed to process.
    - `cancelled` integer, required — The number of files that were cancelled.
    - `total` integer, required — The total number of files.
  - `status` 'expired' | 'in_progress' | 'completed', required — 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.
  - `expires_after` VectorStoreExpirationAfter — The expiration policy for a vector store.
    - `anchor` 'last_active_at', required — Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.
    - `days` integer, required — The number of days after the anchor time that the vector store will expire.
  - `expires_at` integer, nullable — The Unix timestamp (in seconds) for when the vector store will expire.
  - `last_active_at` integer, nullable, required — The Unix timestamp (in seconds) for when the vector store was last active.
  - `metadata` Metadata, nullable, required — 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.

## Other responses

- `429` — The request was rejected because a rate limit was exceeded.

## Changes

> 82 revisions in range; 28 could not be searched.

- **2026-05-13** `74cbcf73838f` — 4 breaking, 1 info
  - the request property `metadata` became not nullable
  - response property `expires_at` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - response property `last_active_at` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - response property `metadata` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - …1 more
- **2025-01-31** `fc164a27fdb9` — 3 breaking, 2 warning
  - added `#/components/schemas/VectorStoreExpirationAfter, subschema #2` to the `expires_after` request property `allOf` list
  - the request property `expires_after` became not nullable
  - the `expires_after` request property type/format changed from `object`/`` to ``/``
  - removed the request property `expires_after/anchor`
  - …1 more
- **2025-01-31** `15156e46769c` — 3 breaking, 1 warning, 1 info
  - added the new required request property `expires_after/anchor`
  - added the new required request property `expires_after/days`
  - the `expires_after` request property type/format changed from ``/`` to `object`/``
  - removed `#/components/schemas/VectorStoreExpirationAfter, subschema #2` from the `expires_after` request property `allOf` list
  - …1 more
- …earlier changes not shown

[Full history](https://skmtc.dev/openai/apis/openapi/changes/vector_stores/:vector_store_id/post.md)

---

[API](https://skmtc.dev/openai/apis/openapi.md) · [All operations](https://skmtc.dev/openai/apis/openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openai/openapi/revisions/959ef977e135/schema)
