Get Upload URL
Returns a presigned S3 PUT URL for direct file upload. Lets clients upload files without managing AWS credentials or staging buckets — the server signs a single-use URL bound to a server-generated S3 object key, the client PUTs the file body to that URL, then registers the upload via POST /v1/sources with the returned file_key.
Why this exists: POST /v1/sources requires a file_key for an object that already exists in our backing storage. Customers without their own staging bucket use this endpoint to obtain an upload URL pointed at the canonical destination directly, eliminating any client-side AWS setup.
Important — Content-Type binding: The presigned URL is signed with Content-Type baked into the signature. The client MUST send a matching Content-Type header on the PUT request, otherwise S3 rejects with HTTP 403 (SignatureDoesNotMatch). The expected value is returned in the content_type field of this response — pass it back as the Content-Type header on your PUT.
Workflow:
- Create a source batch via
POST /v1/source_batches(returnssource_batch_id) - Call this endpoint with
name,source_type,source_batch_id(returnsupload_url,file_key,content_type,expires_in) - PUT the file to
upload_urlwithContent-Type: <content_type>header - Register the source via
POST /v1/sourceswithfile_keyfrom step 2 - Poll
GET /v1/sources/{source_id}untilstatus: "success" - Reference
source_batch_idin chat/search requests
Constraints:
- Supported
source_type:pdf,docx,xlsx,pptx,doc,txt - Maximum file size enforced at registration step: 20MB
- Maximum 10 active sources (status:
processingorsuccess) per source_batch —failed/deletedsources do not count toward the limit (enforced when generating the URL) - URL expires after 10 minutes (
expires_in: 600) - File is validated at registration time (
POST /v1/sources); a wrong-content upload will be accepted by S3 but rejected when registering
Documentation Index
Fetch the complete documentation index at: https://docs.linqalpha.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Body
Display name for the source, typically the original filename. Used to construct the S3 object key.
"Q4_Revenue_Report.pdf"
File extension. Determines the expected Content-Type baked into the presigned URL signature.
pdf, docx, xlsx, pptx, doc, txt "pdf"
Source batch the upload will be registered under. Must be created first via POST /v1/source_batches. Per-batch source limit (10) is enforced here.
"123e4567-e89b-12d3-a456-426614174000"
Response
Presigned upload URL generated
Presigned S3 PUT URL. Single-use, signed with the content_type value below. Send the file body via PUT <upload_url> with header Content-Type: <content_type>.
"https://linq-vertex-documents.s3.amazonaws.com/uploads/1715000000000_a1b2c3d4_Q4_Revenue_Report.pdf/original.pdf?X-Amz-Algorithm=...&X-Amz-Signature=..."
Server-generated object key. Pass this as file_key in the subsequent POST /v1/sources call to register the uploaded file.
"uploads/1715000000000_a1b2c3d4_Q4_Revenue_Report.pdf/original.pdf"
Content-Type baked into the presigned URL signature. Client MUST send this exact value as the Content-Type header on the PUT, otherwise S3 rejects with HTTP 403 (SignatureDoesNotMatch).
"application/pdf"
Seconds until upload_url expires. After this, request a new URL.
600