POST
/
update
/
{namespace}
curl $UPSTASH_VECTOR_REST_URL/update \
  -X POST \
  -H "Authorization: Bearer $UPSTASH_VECTOR_REST_TOKEN" \
  -d '{ "id": "id-1", "metadata": { "link": "upstash.com" } }'
{
    "result": {
        "updated": 1
    }
}

The vector will be updated int the default namespace by default. You can use a different namespace by specifying it in the request path.

Request

You can either update a vector value, data, or metadata. So, only and only one of those fields must be passed in the request.

To update both vector value and metadata, or data and metadata, use Upsert Vector or Upsert Data endpoint.

id
string
required

The id of the vector.

vector
number[]

The vector value to update to.

The vector should have the same dimensions as your index.

data
string

The raw text data to embed into a vector and update to.

To update with data, the index must be created with an embedding model.

metadata
Object

The metadata to update to.

Path

namespace
string
default: ""

The namespace to use. When no namespace is specified, the default namespace will be used.

Response

updated
number

1 if any vector is updated, 0 otherwise.