---
title: "Upsert vectors"
method: POST
path: "/api/v1/vector/write"
---

# Upsert vectors

`POST /api/v1/vector/write`

Upsert one or more vectors into the collection. Each vector has a
user-provided string ID (up to 64 bytes), a dense embedding in the
`vector` attribute, and optional metadata attributes.

If a vector with the same ID already exists, it is replaced.

Supports both binary protobuf (`application/protobuf`) and ProtoJSON
(`application/protobuf+json`) request bodies.

## Response `200`

Vectors upserted successfully.

## Other responses

- `400` — Invalid input (malformed body, missing ID, missing vector, type mismatch).
- `500` — Internal server error.

---

[API](https://skmtc.net/opendata-oss/apis/opendata-vector-api.md) · [All operations](https://skmtc.net/opendata-oss/apis/opendata-vector-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opendata-oss/opendata-vector-api/versions/c2b4afb0cdb8/schema)
