Quick Start

Quick Start

Get up and running with doczap in 5 minutes.

1. Get your API key

First, sign up for a doczap account and create your API key from the dashboard.

Your API key will look like: sk_live_abc123_xyz789

Store your API key securely. Never commit it to version control or expose it in client-side code.

2. Upload a template

Templates are files with placeholders for dynamic content. You can create templates with your favorite design tools.

Upload your template via the dashboard and configure an endpoint path (e.g., invoice).

3. Make your first API call

curl -X POST https://api.doczap.app/api/v1/your-org/templates/invoice/documents \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_number": "INV-001",
    "customer_name": "Acme Corp",
    "amount": "$1,250.00",
    "due_date": "2024-12-31"
  }'

4. Handle the response

For synchronous requests, you’ll receive the PDF binary directly:

HTTP/1.1 200 OK
Content-Type: application/pdf
Content-Length: 123456

[PDF binary data]

5. Try async mode

For better performance with high-volume requests, use async mode:

curl -X POST https://api.doczap.app/api/v1/your-org/templates/invoice/documents \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -H "Prefer: respond-async" \
  -d '{
    "invoice_number": "INV-002",
    "customer_name": "Beta Corp",
    "amount": "$2,500.00",
    "due_date": "2025-01-15"
  }'

Async mode returns immediately with a request ID. Configure webhooks to receive the PDF when ready.

Comparison: Sync vs Async

FeatureSynchronousAsynchronous
Response time100-2000ms*< 50ms
Use caseReal-time generationBatch processing
Webhook supportNoYes
Max timeout30 secondsNo limit
Best for< 10 PDFs/minuteHigh volume

*Response times are typical but not guaranteed and may vary based on system load.

Next steps