Skip to main content
Version: 2.0

Add a document to a corpus

POST 

/v2/corpora/:corpus_key/documents

Add a document to a corpus. This endpoint supports two document formats, structured and core.

  • Structured documents have a more conventional structure that provide document sections and parts in a format created by Vectara's proprietary strategy automatically. You provide a logical document structure, and Vectara handles the partitioning.
  • Core documents differ in that they follow an advanced, granular structure that explicitly defines each document part in an array. Each part becomes a distinct, searchable item in query results. You have precise control over the document structure and content.

For more details, see Indexing.

Request

Responses

Document added to the corpus.