---
title: "Batch upsert vectors."
method: POST
path: "/api/v1/tenants/{tenant_id}/vectors/batch/upsert"
tags: ["Vectors"]
---

# Batch upsert vectors.

`POST /api/v1/tenants/{tenant_id}/vectors/batch/upsert`

## Request

- Base URL: `https://api.scalix.world`
- URL: `https://api.scalix.world/api/v1/tenants/{tenant_id}/vectors/batch/upsert`
- Auth: HTTP bearer

Inserts or updates many vectors in a collection in a single request
(one multi-row write). Returns the number of vectors upserted.

## Path parameters

- `tenant_id` string, required

## Request body

- VectorUpsertRequest: Upsert a batch of vectors into a collection.
  - `collection` string, required
  - `entries` VectorEntry[], required
    - `id` string, required
    - `embedding` number[], required: The embedding values.
    - `metadata` object, nullable

## Response `201`

Vectors upserted (count returned)

## Other responses

- `400`: Invalid request (e.g. dimension mismatch or batch too large)
- `401`: Missing or invalid API key
- `503`: Vector store unavailable

---

[API](https://skmtc.dev/scalix/apis/scalix-cloud-api.md) · [All operations](https://skmtc.dev/scalix/apis/scalix-cloud-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scalix/apis/scalix-cloud-api/revisions/2c04ca0a90bb?raw)
