Skip to main content
POST
/
deals
/
documents
curl -X POST https://app.usehindsight.com/api/v1/deals/documents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_name": "Discovery Call Recording.mp3",
    "file_url": "https://example.com/recording.mp3",
    "content_type": "audio/mpeg",
    "salesforce_id": "006xxxxxxxxxxxx",
    "source": "gong"
  }'
{
  "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"
}
Associate documents with specific deals for win-loss analysis. Audio and video files are automatically transcribed.
POST https://app.usehindsight.com/api/v1/deals/documents
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, audio/mpeg, video/mp4
  deal_id: string — Hindsight deal ID
  salesforce_id: string — Salesforce Opportunity ID
  hubspot_id: string — HubSpot Deal ID
  source: gong | clari | fathom | fireflies | avoma | outreach | gmail | Salesforce | Hubspot | api
Provide exactly one of: deal_id, salesforce_id, or hubspot_id.

200 Response:
{
  "document": {
    "id": "doc_abc123",
    "file_name": "Discovery Call Recording.mp3",
    "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)

Deal Identification

You can identify the deal using one of three methods:
ParameterDescription
deal_idHindsight’s internal deal ID
salesforce_idSalesforce Opportunity ID (e.g., 006xxxxxxxxxxxx)
hubspot_idHubSpot Deal ID

Source Options

The source field determines the icon displayed and helps with document organization:
SourceDescription
gongGong call recordings
clariClari
fathomFathom AI
firefliesFireflies.ai
avomaAvoma
outreachOutreach
gmailGmail
SalesforceSalesforce
HubspotHubSpot
apiAPI upload

Supported File Types

CategoryFormatsNotes
DocumentsPDF, DOCX, PPTX, XLSX, MD, TXTParsed and chunked for search
AudioMP3, WAV, M4AAutomatically transcribed via Whisper
VideoMP4Automatically transcribed via Whisper
curl -X POST https://app.usehindsight.com/api/v1/deals/documents \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "file_name": "Discovery Call Recording.mp3",
    "file_url": "https://example.com/recording.mp3",
    "content_type": "audio/mpeg",
    "salesforce_id": "006xxxxxxxxxxxx",
    "source": "gong"
  }'

Authorizations

Authorization
string
header
required

API key from Hindsight dashboard

Body

multipart/form-data
file_name
string
required

Name of the file

Example:

"Discovery Call Notes.pdf"

content_type
string
required

MIME type of the file

Example:

"application/pdf"

file_url
string<uri>

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

file
file

Binary file content (provide either file or file_url)

deal_id
string

Hindsight deal ID (provide one of deal_id, salesforce_id, or hubspot_id)

Example:

"deal_123"

salesforce_id
string

Salesforce Opportunity ID

Example:

"006xxxxxxxxxxxx"

hubspot_id
string

HubSpot Deal ID

Example:

"12345678"

source
enum<string>

Source application where the document originated

Available options:
gong,
clari,
fathom,
fireflies,
avoma,
outreach,
gmail,
Salesforce,
Hubspot,
api
Example:

"gong"

Response

Document upload initiated

document
object
run_id
string

ID to track the document processing run

Example:

"run_xyz789"