Skip to main content
POST
/
v1
/
sources
/
upload_url
Get Upload URL
curl --request POST \
  --url https://api.linqalpha.com/v1/sources/upload_url \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "Q4_Revenue_Report.pdf",
  "source_type": "pdf",
  "source_batch_id": "123e4567-e89b-12d3-a456-426614174000"
}
'
{
  "upload_url": "https://linq-vertex-documents.s3.amazonaws.com/uploads/1715000000000_a1b2c3d4_Q4_Revenue_Report.pdf/original.pdf?X-Amz-Algorithm=...&X-Amz-Signature=...",
  "file_key": "uploads/1715000000000_a1b2c3d4_Q4_Revenue_Report.pdf/original.pdf",
  "content_type": "application/pdf",
  "expires_in": 600
}

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

X-API-KEY
string
header
required

Body

application/json
name
string
required

Display name for the source, typically the original filename. Used to construct the S3 object key.

Example:

"Q4_Revenue_Report.pdf"

source_type
enum<string>
required

File extension. Determines the expected Content-Type baked into the presigned URL signature.

Available options:
pdf,
docx,
xlsx,
pptx,
doc,
txt
Example:

"pdf"

source_batch_id
string<uuid>
required

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.

Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

Presigned upload URL generated

upload_url
string<uri>
required

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>.

Example:

"https://linq-vertex-documents.s3.amazonaws.com/uploads/1715000000000_a1b2c3d4_Q4_Revenue_Report.pdf/original.pdf?X-Amz-Algorithm=...&X-Amz-Signature=..."

file_key
string
required

Server-generated object key. Pass this as file_key in the subsequent POST /v1/sources call to register the uploaded file.

Example:

"uploads/1715000000000_a1b2c3d4_Q4_Revenue_Report.pdf/original.pdf"

content_type
string
required

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).

Example:

"application/pdf"

expires_in
integer
required

Seconds until upload_url expires. After this, request a new URL.

Example:

600