Skip to main content
POST
/
documents
/
deals
curl -X POST https://api.hindsight.com/api/v1/documents/deals \
  -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",
    "deal_id": "<string>",
    "url": "https://app.hindsight.com/library/doc_abc123",
    "created_at": "2026-02-10T12:00:00Z"
  },
  "workflow_id": "run_xyz789"
}
Associate documents with specific deals for win-loss analysis. Audio and video files are automatically transcribed.

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://api.hindsight.com/api/v1/documents/deals \
  -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

application/json
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_base64)

file_base64
string<byte>

Base64-encoded file content (provide either file_url or file_base64)

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
workflow_id
string

ID to track the document processing workflow

Example:

"run_xyz789"