Encrypted Index
Upsert Vectors
POST
Upsert Vectors
Add new vectors or update existing ones in the encrypted index.
Any valid credential is accepted — the root key or a per-user
Here
With Auto-Training Triggered:
With Training Check Warning:
With Metadata:
Auto-Generated Embeddings:
Batch Upsert:
Authentication
Required - API key viaX-API-Key header:
cdbk_ token. When RBAC is not enabled (CYBORGDB_SERVICE_ROOT_KEY unset), no header is required.
Request Body
Full-Text (BM25) Ingestion
There is no separate ingestion call or parameter for BM25: text is indexed at upsert, from the metadata fields the index designatedfull_text at creation. Put the searchable text in those fields and it is analyzed and added to the encrypted BM25 index automatically, making the item retrievable via text on /v1/vectors/query and /v1/vectors/query_metadata.
title and body are BM25-searchable if the index marked them full_text; category (a regular filterable field) is exact-match indexed as usual.
- A
full_textfield’s value must be a JSON string. Items where the field is missing or non-string are skipped for that field — the upsert still succeeds, and the service logs one warning per field per batch. full_textdesignations are fixed at index creation; text upserted into non-designated fields is stored as ordinary metadata and is not text-searchable.full_textfields are analyzed instead of exact-match indexed (filterable: false), so they cannot be used infilterson/v1/vectors/query_metadataor on hybrid queries.
Response
Standard Success Response:When the number of vectors in an index exceeds the automatic training threshold, the upsert response will include
training_triggered and training_message fields. Training happens asynchronously in the background.In rare cases where the training check encounters an error but the upsert operation itself succeeds, a warning field will be included instead. The vectors are still successfully upserted in this scenario.Exceptions
400 Bad Request
400 Bad Request
Invalid values (e.g. vector dimension mismatch with the index)
404 Not Found
404 Not Found
Index not found
422 Unprocessable Entity
422 Unprocessable Entity
Request body failed validation (missing/mistyped fields)
500 Internal Server Error
500 Internal Server Error
Internal server error
Example Usage
Basic Upsert:When
embedding_model is configured for the index, the vector parameter becomes optional. If provided, it will be used directly; if omitted, a vector will be auto-generated from the contents field.