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
- 201
- 400
- 403
- 404
- 409
Document added to the corpus.
Document creation request was malformed.
Permissions do not allow adding a document to the corpus.
Corpus not found.
The document already exists