Skip to main content
POST
/
documents
/
library
curl -X POST https://app.usehindsight.com/api/v1/documents/library \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file_name=Competitor X Pricing Guide.pdf" \
  -F "file_url=https://example.com/document.pdf" \
  -F "content_type=application/pdf" \
  -F "type=asset" \
  -F "competitor_name=Competitor X" \
  -F "source=drive"
{
  "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"
}
Upload competitive intelligence documents, assets, and battlecards to your library.
POST https://app.usehindsight.com/api/v1/documents/library
Authorization: Bearer YOUR_API_KEY
Content-Type: multipart/form-data

Request fields (multipart/form-data):
  file_name: string (required)
  file_url: string (uri) — URL to fetch file from
  file: binary — binary file content (alternative to file_url)
  content_type: string (required) — MIME type, e.g. application/pdf
  type: asset | intel (required)
  competitor_id: string — Hindsight competitor ID
  competitor_name: string — resolved to competitor_id automatically
  source: drive | notion | confluence | onedrive | sharepoint | vanta | url | zapier | api

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

Rate limits: 10 req/min (Essentials), 60 req/min (Growth), 300 req/min (Enterprise)
           10,000/mo (Essentials), 30,000/mo (Growth), 100,000/mo (Enterprise)

Document Types

TypeDescription
assetSales enablement content like battlecards, one-pagers, guides
intelCompetitive intelligence gathered from external sources

Source Options

The source field determines the icon displayed in the Hindsight UI:
SourceDescription
driveGoogle Drive
notionNotion
confluenceConfluence
onedriveOneDrive
sharepointSharePoint
vantaVanta
urlWeb URL
zapierZapier automation
apiAPI upload
curl -X POST https://app.usehindsight.com/api/v1/documents/library \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file_name=Competitor X Pricing Guide.pdf" \
  -F "file_url=https://example.com/document.pdf" \
  -F "content_type=application/pdf" \
  -F "type=asset" \
  -F "competitor_name=Competitor X" \
  -F "source=drive"

Authorizations

Authorization
string
header
required

API key from Hindsight dashboard

Body

multipart/form-data
file_name
string
required

Name of the file

Example:

"Competitor X Pricing Guide.pdf"

content_type
enum<string>
required

MIME type of the file

Available options:
application/pdf,
text/markdown,
text/plain,
application/vnd.openxmlformats-officedocument.wordprocessingml.document,
application/vnd.openxmlformats-officedocument.presentationml.presentation,
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Example:

"application/pdf"

type
enum<string>
required

Document type

Available options:
asset,
intel
file_url
string<uri>

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

Example:

"https://example.com/document.pdf"

file
file

Binary file content (provide either file or file_url)

competitor_id
string

Hindsight competitor ID (provide either competitor_id or competitor_name)

Example:

"comp_123"

competitor_name
string

Competitor name - will be resolved to competitor_id automatically

Example:

"Competitor X"

source
enum<string>

Source application where the document originated

Available options:
drive,
notion,
confluence,
onedrive,
sharepoint,
vanta,
url,
zapier,
api
Example:

"drive"

Response

Document upload initiated

document
object
run_id
string

ID to track the document processing run

Example:

"run_xyz789"