End-to-end workflow guide — from creating your first template to generating and sharing a PDF.
DocuStream works in three simple steps:
Access the web dashboard at your service URL (e.g., https://your-app.docustream.com). Sign in with your account credentials.
The dashboard home page lists all your saved templates. From here you can:
{{variableName}} placeholders for dynamic values.Example template HTML:
<!DOCTYPE html>
<html>
<head>
<style>
body { font-family: Arial, sans-serif; padding: 40px; }
h1 { color: #333; }
</style>
</head>
<body>
<h1>Invoice #{{invoiceNumber}}</h1>
<p><strong>Bill To:</strong> {{clientName}}</p>
<p><strong>Due Date:</strong> {{dueDate}}</p>
<p><strong>Amount Due:</strong> {'$'}{{amount}}</p>
</body>
</html>The PDF is stored securely in cloud storage and accessed via a signed URL that expires automatically.
Prefer to integrate directly? Use the REST API.
curl -X POST https://your-api.docustream.com/api/templates \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Invoice Template",
"content": "<html><body><h1>Invoice #{{invoiceNumber}}</h1></body></html>"
}'curl -X POST https://your-api.docustream.com/api/pdfs/generate \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "tmpl_abc123",
"variables": {
"invoiceNumber": "INV-2026-001",
"clientName": "Acme Corp",
"amount": "1,250.00"
}
}'curl "https://your-api.docustream.com/api/pdfs/pdf_xyz789/download?accessedBy=user@acme.com" \
-H "x-api-key: YOUR_API_KEY"@page { size: A4; margin: 20mm; } in your stylesheet.<div style="page-break-after: always;"></div> between sections.| Use Case | Example Variables |
|---|---|
| Invoice | invoiceNumber, clientName, total, dueDate |
| Contract | partyName, effectiveDate, terms |
| Certificate | recipientName, courseName, completionDate |
| Report | reportTitle, generatedDate, summaryText |
401 Invalid API Key
Verify you are sending the x-api-key header (not Authorization: Bearer). Contact your admin for a new key.
PDF looks wrong or blank
Open the raw HTML in a browser to confirm it renders. Check that all {{variable}} names exactly match the keys you send (case-sensitive).
Signed URL has expired
Call GET /api/pdfs/:id/download to get a fresh URL. The original PDF is still in storage.
429 Rate Limit Exceeded
The API allows 100 requests per 15-minute window. Slow down requests or contact your admin for a higher limit.