Vectara Documents API

Upload, index, retrieve, update, and delete documents in a corpus.

Operations 8

POST /v2/corpora/{corpus_key}/upload_file Upload A File #
GET /v2/corpora/{corpus_key}/documents List Corpus Documents #
POST /v2/corpora/{corpus_key}/documents Add A Structured (Core) Document #
DELETE /v2/corpora/{corpus_key}/documents Bulk Delete Documents #
GET /v2/corpora/{corpus_key}/documents/{document_id} Retrieve A Document #
PATCH /v2/corpora/{corpus_key}/documents/{document_id} Update Document Metadata #
DELETE /v2/corpora/{corpus_key}/documents/{document_id} Delete A Document #
POST /v2/corpora/{corpus_key}/documents/{document_id}/summarize Summarize A Document #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/vectara-documents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

vectara-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Vectara REST Documents API
  description: 'Vectara REST API v2 is the unified interface for the Vectara Retrieval Augmented

    Generation (RAG) platform.'
  version: '2.0'
  contact:
    name: Vectara Support
    url: https://docs.vectara.com/docs/support
  license:
    name: Proprietary
servers:
- url: https://api.vectara.io
  description: Vectara REST API production base URL
- url: https://auth.vectara.io
  description: Vectara OAuth 2.0 token endpoint
security:
- ApiKeyAuth: []
- OAuth2: []
tags:
- name: Documents
  description: Upload, index, retrieve, update, and delete documents in a corpus.
paths:
  /v2/corpora/{corpus_key}/upload_file:
    parameters:
    - $ref: '#/components/parameters/CorpusKey'
    post:
      tags:
      - Documents
      summary: Upload A File
      description: Upload an unstructured file (PDF, DOCX, HTML, etc.) to be parsed and indexed.
      operationId: uploadFile
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                metadata:
                  type: string
      responses:
        '201':
          description: File uploaded and indexing started.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
  /v2/corpora/{corpus_key}/documents:
    parameters:
    - $ref: '#/components/parameters/CorpusKey'
    get:
      tags:
      - Documents
      summary: List Corpus Documents
      operationId: listDocuments
      parameters:
      - in: query
        name: limit
        schema:
          type: integer
      - in: query
        name: page_key
        schema:
          type: string
      - in: query
        name: metadata_filter
        schema:
          type: string
      responses:
        '200':
          description: List of documents.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDocumentsResponse'
    post:
      tags:
      - Documents
      summary: Add A Structured (Core) Document
      operationId: addDocument
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Document'
      responses:
        '201':
          description: Document created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
    delete:
      tags:
      - Documents
      summary: Bulk Delete Documents
      operationId: bulkDeleteDocuments
      parameters:
      - in: query
        name: metadata_filter
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Documents deleted.
  /v2/corpora/{corpus_key}/documents/{document_id}:
    parameters:
    - $ref: '#/components/parameters/CorpusKey'
    - $ref: '#/components/parameters/DocumentId'
    get:
      tags:
      - Documents
      summary: Retrieve A Document
      operationId: getDocument
      responses:
        '200':
          description: Document.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
    patch:
      tags:
      - Documents
      summary: Update Document Metadata
      operationId: updateDocument
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata:
                  type: object
                  additionalProperties: true
      responses:
        '200':
          description: Document updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
    delete:
      tags:
      - Documents
      summary: Delete A Document
      operationId: deleteDocument
      responses:
        '204':
          description: Document deleted.
  /v2/corpora/{corpus_key}/documents/{document_id}/summarize:
    parameters:
    - $ref: '#/components/parameters/CorpusKey'
    - $ref: '#/components/parameters/DocumentId'
    post:
      tags:
      - Documents
      summary: Summarize A Document
      operationId: summarizeDocument
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                llm_name:
                  type: string
                prompt_name:
                  type: string
      responses:
        '200':
          description: Summary.
          content:
            application/json:
              schema:
                type: object
                properties:
                  summary:
                    type: string
components:
  parameters:
    DocumentId:
      in: path
      name: document_id
      required: true
      schema:
        type: string
      description: The unique identifier of a document.
    CorpusKey:
      in: path
      name: corpus_key
      required: true
      schema:
        type: string
      description: The unique key identifying a corpus.
  schemas:
    PageMetadata:
      type: object
      properties:
        page_key:
          type: string
        next_page_key:
          type: string
    ListDocumentsResponse:
      type: object
      properties:
        documents:
          type: array
          items:
            $ref: '#/components/schemas/Document'
        metadata:
          $ref: '#/components/schemas/PageMetadata'
    Document:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
          - core
          - structured
        metadata:
          type: object
          additionalProperties: true
        document_parts:
          type: array
          items:
            type: object
            properties:
              text:
                type: string
              metadata:
                type: object
                additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Vectara API key passed in the `x-api-key` header.
    OAuth2:
      type: oauth2
      description: OAuth 2.0 client credentials flow.
      flows:
        clientCredentials:
          tokenUrl: https://auth.vectara.io/oauth2/token
          scopes: {}