Submitting Documents
Two endpoints for getting documents into your pipeline — multipart form upload for standard integrations, and raw binary for serverless or streaming workflows.
Submit Pipeline Document
POST /api/v1/pipelines/{pipeline_id}/documents
Submit a PDF deck to a pipeline via file upload or URL. AlphaLens enqueues the document for indexing and runs your pipeline's configured questions.
Parameters
|
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
integer (path) |
Yes |
The pipeline to submit the document to |
|
|
file (multipart) |
One of file or URL |
PDF file to upload directly |
|
|
string (form field) |
One of file or URL |
URL to a supported deck provider (DocSend, Google Slides, Notion, Pitch.com) |
|
|
string (form field) |
No |
Email address used when fetching a deck from a URL |
|
|
string (form field) |
No |
Password for accessing a protected deck link |
|
|
JSON string (form field) |
No |
Custom key-value metadata to attach to the document (JSON-encoded) |
Note: Provide either attachment_file or attachment_url, not both. The attachment_email and attachment_password fields are only relevant when using attachment_url.
Response — 202 Accepted
|
Field |
Type |
Description |
|---|---|---|
|
|
integer |
Unique identifier for the submitted document |
|
|
string |
URL to view the document in AlphaLens |
Errors
|
Status |
Description |
|---|---|
|
|
Invalid input — check file format or missing required fields |
|
|
Authentication required |
|
|
Authorization denied or credit limit exceeded |
|
|
Pipeline not found |
|
|
Rate limit exceeded (per company, per minute) |
Submit Pipeline Document (Binary)
POST /api/v1/pipelines/{pipeline_id}/documents-binary-data
Submit a document as raw binary data. Use this endpoint when streaming file bytes directly rather than using multipart form upload — for example, from a serverless function or data pipeline where constructing multipart requests is impractical.
Parameters
|
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
integer (path) |
Yes |
The pipeline to submit the document to |
|
Request body |
binary ( |
Yes |
Raw PDF file bytes |
Example
bash
curl -X POST "/api/v1/pipelines/{pipeline_id}/documents-binary-data" \
-H "Content-Type: application/pdf" \
-H "API-Key: your-api-key" \
--data-binary "@./deck.pdf"
Response — 202 Accepted
|
Field |
Type |
Description |
|---|---|---|
|
|
integer |
Unique identifier for the submitted document |
|
|
string |
URL to view the document in AlphaLens |
Errors
Same as the standard submit endpoint above.