Skip to main content

Webhooks

Overview

Webhooks notify your application when document events occur. Instead of polling for status, receive instant notifications to a URL you specify.

Supported Events

  • document.completed - Document generation finished successfully
  • document.failed - Document generation failed
  • batch.completed - Batch generation finished
  • batch.failed - Batch generation failed

Creating Webhooks

  1. Click Create Webhook
  2. Enter your endpoint URL (must be HTTPS)
  3. Select the events you want to receive
  4. Optionally add a description
  5. Click Create

Webhook Payload

Each webhook delivery includes:

  • Event type
  • Timestamp
  • Resource data (document/batch details)
  • Signature for verification

Security

Signature Verification

Every webhook includes an X-RenderDoc-Signature header. Verify this signature to ensure the webhook came from RenderDoc:

const crypto = require('crypto');
const signature = crypto
.createHmac('sha256', webhookSecret)
.update(rawBody)
.digest('hex');

Secret Rotation

Rotate your webhook secret periodically:

  1. Open webhook details
  2. Click Rotate Secret
  3. Update your application with the new secret

Delivery & Retries

  • Webhooks timeout after 10 seconds
  • Failed deliveries retry up to 4 times
  • Retry delays: immediate, 1 min, 5 min, 30 min
  • After 10 consecutive failures, webhook is disabled

Monitoring

  • View delivery history in webhook details
  • See response codes and timing
  • Retry failed deliveries manually
  • Check webhook health status

Best Practices

  • Always verify signatures
  • Respond quickly (< 10 seconds)
  • Use queues for heavy processing
  • Monitor delivery success rates