Document Management API
The Document Management API allows you to programmatically upload documents for analysis and retrieve document information.External IDs: The API uses external IDs (from your CRM system) for contacts and accounts rather than internal Fabius IDs. This allows seamless integration without needing to map between different ID systems.
Create Document
Upload a new document to Fabius for processing and analysis.Endpoint
Request Body
Example Request
Example with Custom Timestamp
When uploading historical documents or processing documents in batch, you can specify when the document was originally created:Response
Status Code:201 Created
List Documents
Retrieve a paginated list of documents.Endpoint
Query Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
limit | integer | Number of documents to return (1-100) | 20 |
offset | integer | Number of documents to skip | 0 |
externalContactId | string | Filter by external contact ID | - |
externalAccountId | string | Filter by external account ID | - |
The response includes a
nextOffset field that indicates the offset to use for the next page of results. When nextOffset is -1, there are no more pages available.Example Request
Response
Get Document
Retrieve a specific document by ID.Endpoint
Example Request
Response
Document Analysis Results
When retrieving a specific document, the response includes analysis results if the document has been processed by AI analysis configurations.Analysis Structure
Each analysis contains:- configurationId: Unique identifier for the analysis configuration used
- configurationName: Human-readable name of the analysis configuration
- runAt: Timestamp when the analysis was performed
- fields: Array of extracted fields from the analysis
Field Types
Fields can be one of two types:Score Fields
Score fields represent numerical evaluations with qualitative context:value: Numerical score (nullable)pros: Positive aspects identifiedcons: Areas for improvementsuggestions: Optional recommendations
Value Fields
Value fields contain extracted data in various formats:- string: Single text value (e.g., “Negotiation”)
- strings: Array of text values (e.g., [“Budget”, “Timeline”, “Features”])
- map: Key-value pairs (e.g.,
{"competitor": "Acme Corp", "strengths": "Price"})
The list documents endpoint returns an
analysisCount field showing how many analyses have been run on each document, but does not include the full analysis details to keep response sizes manageable.Document Timestamps
By default, documents are timestamped with the current time when created. However, you can specify a custom timestamp to preserve the original creation date:Document timestamps must be in RFC3339 format (ISO 8601 with timezone). This is useful for:
- Batch uploading historical documents
- Maintaining accurate timelines when migrating data
- Preserving original document dates from other systems
User Association
Documents can be associated with users in your system by providing their email address:The email address must match an existing Gong user in your Fabius account. The system will look up the user by email address and associate the document with them.
Best Practices
- Document Naming: Use descriptive names that help identify documents later
- User Association: Always include userEmail when the document is related to a specific team member
- Entity Linking: Use external IDs from your CRM system when linking documents to contacts and accounts
- Content Format: Provide clean, well-formatted text content for best analysis results
- Batch Operations: When uploading multiple documents, implement proper error handling and retries
Document Types
Documents are created with the following default settings:- Type:
FORM_SUBMISSION - Timestamp: Current time (unless specified via
documentTimestamp) - Processing: Documents are automatically queued for AI analysis after creation
Limitations
- Maximum documents per request: 1 (batch uploads coming soon)
- Content format: Plain text is recommended for best analysis results
- Entity associations: Documents can be linked to contacts and accounts via their UUIDs