Documents

Upload document to knowledge base

Upload competitive intelligence documents, assets, and other files to your library. Documents are automatically processed, chunked, and indexed for search.

post/documents/library

Request

  • Base URL
    https://app.usehindsight.com/api/v1
  • Auth
    HTTP bearer

Request body multipart/form-data

file_namestring required

Name of the file

file_urlstring uri

URL to download the file from (provide either file_url or file)

filestring binary

Binary file content (provide either file or file_url)

content_type'application/pdf' | 'text/markdown' | 'text/plain' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' required

MIME type of the file

type'asset' | 'intel' required

Document type

competitor_idstring

Hindsight competitor ID (provide either competitor_id or competitor_name)

competitor_namestring

Competitor name - will be resolved to competitor_id automatically

source'drive' | 'notion' | 'confluence' | 'onedrive' | 'sharepoint' | 'vanta' | 'url' | 'zapier' | 'api'

Source application where the document originated

Example request

{
  "file_name": "Competitor X Pricing Guide.pdf",
  "file_url": "https://example.com/document.pdf",
  "content_type": "application/pdf",
  "competitor_id": "comp_123",
  "competitor_name": "Competitor X",
  "source": "drive"
}

Response

Document upload initiated

run_idstring

ID to track the document processing run

Example response

{
  "document": {
    "id": "doc_abc123",
    "file_name": "Competitor X Pricing Guide.pdf",
    "status": "processing",
    "type": "asset",
    "url": "https://app.usehindsight.com/deals/deal_123/documents/viewer/doc_abc123",
    "created_at": "2026-02-10T12:00:00Z"
  },
  "run_id": "run_xyz789"
}

Changes

No recorded changes to this operation across all 1 revision of this API.