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
- Click Create Webhook
- Enter your endpoint URL (must be HTTPS)
- Select the events you want to receive
- Optionally add a description
- 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:
- Open webhook details
- Click Rotate Secret
- 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