Prerequisites
- API key (API keys)
- Channel ID as
queueId(Channels) - Document type mapped to an agent on that channel
Upload
POST /api/v1/queues/{queueId}/files with multipart field files (repeat for multiple files). Optional form fields: documentTypeKey, documentCount.
Response 202 includes queueId, optional batchId, and fileIds.
Try it in the API reference: Upload files.
Get results
- Poll list/get file or document endpoints until
publicStatusKeyis a terminal snake key such asreadyorfailed. Polling does not emit webhooks. File responses includepageCountafter normalize (pages in the original PDF). A filedownloadUrlis the original upload. A documentdownloadUrlisnullon list and get until that document’s PDF is stored. The document link is never the file link. When the file is one document covering every page, the PDF bytes may equal the upload. - Or subscribe to webhooks for
document.ready/document.failed(and other dotted event keys you enable) - Download original bytes with
GET /api/v1/files/{fileId}/content(API key). A document PDF isGET /api/v1/documents/{documentId}/content, and only after that document is ready and its PDF is stored. That call reads the stored document PDF, not the file object. Ondocument.ready, use the top-levelurlfor that PDF. Document events do not includeoriginal_file. See Webhooks.