Skip to main content

Documentation Index

Fetch the complete documentation index at: https://upstash.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Used to add new documents or update an existing document.
You can only upsert documents with the same structure as defined in your database.

Arguments

DocumentPayload
Document | Document[]
required

Response

'Success' on successful operation.
await index.upsert({
  id: "star-wars",
  content: { title: "Star Wars", genre: "sci-fi" },
  metadata: { year: 1977 }
});