Skip to main content
POST
/
v1
/
sources
Create Source
curl --request POST \
  --url https://api.linqalpha.com/v1/sources \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "source_batch_id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Q4_Revenue_Report.pdf",
  "file_key": "uploaded_sources/2024/q4/revenue_report.pdf"
}
'
{
  "source_id": "456e7890-e89b-12d3-a456-426614174001",
  "size": 2048576,
  "status": "processing"
}

Authorizations

X-API-KEY
string
header
required

Body

application/json
source_batch_id
string<uuid>
required

ID of the source batch to add this source to. The batch must be created first via POST /v1/source_batches.

Example:

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

name
string
required

Display name for the source, typically the original filename. Must not include a file extension.

Example:

"Q4_Revenue_Report"

file_key
string
required

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

Example:

"uploaded_sources/2024/q4/revenue_report.pdf"

user_id
string

User ID

Example:

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

organization_id
string<uuid>

Organization ID

Example:

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

user_email
string

User email

user_name
string

User name

Example:

"John Doe"

Response

Source created and queued for processing

source_id
string<uuid>
required

Unique identifier for the created source. Use this ID to poll processing status via GET /v1/sources/{source_id}.

Example:

"456e7890-e89b-12d3-a456-426614174001"

size
integer
required

File size in bytes

Required range: x >= 0
Example:

2048576

status
enum<string>

Initial processing status (typically 'processing' when first created)

Available options:
processing,
success,
failed
Example:

"processing"