Skip to content
Console
Menu

Queues

Workflows

Getting Started

Authentication

KV Store

Put in Documents

Writes a document to a search index, replacing the current version.

Writes a document to a search index, replacing the current version.

  • Path PUT https://api.data.sylphx.com/v1/documents/index-id/document-id
  • Scope data:write
  • Effect write — a successful call changes state.
  • Collection documents
  • Host https://api.data.sylphx.com

#Request

FieldTypeWhat it is
index_idstringThe search index's id. Required.
document_idstringThe document's id. Required.
document_jsonbytesThe document as JSON, base64; at most 1 MiB.
vectordouble[]The document's embedding, at most 4096 numbers; the index's vector dimensions when it has them.
expected_versionuint64Write only when the current version equals this one (0: any).

#Response

FieldTypeWhat it is
documentDocumentRecordThe stored document.

#DocumentRecord

FieldTypeWhat it is
index_idstringThe search index's id in the environment, for example articles.
document_idstringThe document's id.
document_jsonbytesThe document as JSON, base64.
vectordouble[]The document's embedding; its length is the index's vector dimensions.
sha256stringsha256:<hex> of the document.
versionuint64The version, increasing per document.
updated_at_unix_msint64When this version was written, in Unix milliseconds.

#Errors

Every error arrives in the body Errors describes.

#Examples

curl -X PUT "https://api.data.sylphx.com/v1/documents/index-id/document-id" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'