Uploads a document source to a source batch for use in chat or search conversations. This endpoint accepts files from S3 and initiates processing to extract and parse content. The source is automatically added to the specified source batch.
Important Notes:
POST /v1/source_batchesGET /v1/sources/{source_id} to poll the processing status before using in conversationssource_batch_id in chat/search API requestsWorkflow:
file_key pointing to S3 objectstatus: "success"source_batch_id in chat/search requestsID of the source batch to add this source to. The batch must be created first via POST /v1/source_batches.
"123e4567-e89b-12d3-a456-426614174000"
Display name for the source, typically the original filename. Must not include a file extension.
"Q4_Revenue_Report"
S3 object key path where the file is stored. The file must be accessible to the API service and meet format/size requirements (PDF, DOCX, XLSX, DOC, TXT, PPTX; max 20MB).
"uploaded_sources/2024/q4/revenue_report.pdf"
User ID
"123e4567-e89b-12d3-a456-426614174000"
Organization ID
"123e4567-e89b-12d3-a456-426614174000"
User email
User name
"John Doe"
Source created and queued for processing
Unique identifier for the created source. Use this ID to poll processing status via GET /v1/sources/{source_id}.
"456e7890-e89b-12d3-a456-426614174001"
File size in bytes
x >= 02048576
Initial processing status (typically 'processing' when first created)
processing, success, failed "processing"