Async & Webhooks
Small PDFs finish in a second. Big reports can take 20+ seconds. Use async mode when you want to avoid holding an HTTP connection open.
Request async mode
jsonexample
{
"html": "<html>...</html>",
"async": true,
"webhook_url": "https://yourapp.com/webhooks/pdfend"
}Response (202 Accepted)
jsonexample
{
"id": "pdf_abc123",
"status": "queued",
"poll_url": "https://api.pdfend.com/v1/generations/pdf_abc123"
}Webhook payload
When the job finishes (or fails), PDFend POSTs to webhook_url:
jsonexample
{
"event": "generation.completed",
"id": "pdf_abc123",
"status": "completed",
"url": "https://files.pdfend.com/pdf_abc123.pdf",
"pages": 12,
"size": 245830,
"duration_ms": 18420
}Polling
Don't want webhooks? Poll GET /v1/generations/:id — the shape mirrors the webhook payload.