Skip to main content
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

string
required
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) or application/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

When to Use Each Method

  • 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
  • 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 enabled tracked_changes when uploading the document, the downloaded file will show all edits with Word’s track changes feature.
Example with tracked changes

Error Responses

For best performance in production, use the direct download endpoint for automated workflows and server-to-server communication.