POST /api/webhooks

Get pushed the instant a PDF is ready

Subscribe to four events — pdf.generated, pdf.downloaded, pdf.expired, batch.completed — and we'll POST signed payloads to your URL with automatic retries (60s → 5m → 15m).

Key points

1

No polling required

Notifications arrive within seconds of completion. Latency is bounded by your endpoint, not by a poll interval.

2

HMAC-signed payloads

Every request carries X-Webhook-Signature: sha256=<hex>. Verify with your webhook secret to reject forged calls.

3

Slack URLs auto-detected

Register a hooks.slack.com URL and we'll send a Block Kit message with a download button — no Slack-specific code on your side.

With this feature vs. without

Use webhooksPoll for status
Completion latencyWithin secondsBounded by your poll interval
Server loadOne request per completionItems × poll count
Receiver setupPublic HTTPS endpoint requiredClient-only, no inbound endpoint
Slack/Discord deliveryJust register the URLBuild it yourself

How it looks in code

// Register a webhook endpoint
await fetch("/api/webhooks", {
  method: "POST",
  headers: { "Authorization": `Bearer ${API_KEY}` },
  body: JSON.stringify({
    url: "https://your-app.example.com/hooks/pdf",
    events: ["pdf.generated", "batch.completed"],
  }),
});

// Verify the X-Webhook-Signature header on incoming requests:
//   sha256=HMAC_SHA256(payload, webhook_secret)
//
// 5xx responses are retried with backoff: 60s → 5m → 15m (3 tries total).
// Slack incoming-webhook URLs auto-receive Block Kit payloads.

Wire it into your workflow

Validate the integration on the Free plan, then scale up when you're ready.

Powered by FUNBREW PDF