Download Document (Direct)
API Reference
Download Document (Direct)
Download your document directly without a presigned URL step
GET
Download Document (Direct)
Download Document Directly
Get the document file directly as a binary response, eliminating the two-step presigned URL process. This endpoint is ideal for programmatic downloads and reduces latency. Supports both Word (.docx) and PDF (.pdf) formats.Path Parameters
The unique identifier of the document to download (UUID)
Response
Returns the document file directly with appropriate headers:Content-Type:application/vnd.openxmlformats-officedocument.wordprocessingml.document(for .docx) orapplication/pdf(for .pdf)Content-Disposition:attachment; filename="your-document.docx"(or .pdf)
Code Examples
Benefits over Presigned URL Method
Reduced Latency
One request instead of two - no intermediate S3 URL step
Simpler Code
Fewer lines of code, cleaner implementation
Better for APIs
Perfect for server-to-server communication
Same Features
Supports tracked changes and all document features
Complete Workflow Example
Here’s a complete example showing upload, edit, and direct download:Comparison: Direct vs Presigned URL
| Feature | Direct Download (/download) | Presigned URL (GET /{doc_id}) |
|---|---|---|
| Number of Requests | 1 request | 2 requests (get URL, then download) |
| Latency | Lower - single round trip | Higher - two round trips |
| Use Case | Programmatic/API usage | Client-side downloads, sharing links |
| URL Expiration | N/A - direct download | Configurable (1 second - 24 hours) |
| Security | API key required for each download | Anyone with URL can download (until expiration) |
| Tracked Changes | ✅ Supported | ✅ Supported |
| Best For | Server-to-server, automated workflows | Temporary sharing, client downloads |
When to Use Each Method
Use Direct Download When...
Use Direct Download When...
- Building server-to-server integrations
- Automating document processing workflows
- You need the lowest possible latency
- You want tighter security control (API key per request)
- Processing documents in CI/CD pipelines
Use Presigned URL When...
Use Presigned URL When...
- Sharing documents with users without API access
- You need temporary, expiring download links
- Building client-side applications with limited backend
- You want to offload download traffic from your API
- Implementing time-limited document sharing
Tracked Changes Support
Both download methods support tracked changes. If you enabledtracked_changes when uploading the document, the downloaded file will show all edits with Word’s track changes feature.
Example with tracked changes

