Skip to main content

Overview

Pulse API provides webhooks for real-time notifications about your asynchronous document processing jobs. Configure webhook endpoints to receive automatic updates when extraction jobs complete, fail, or change status.

Why Use Webhooks?

Instead of continuously polling the /job/{job_id} endpoint to check job status, webhooks will provide:
  • Real-time updates - Get notified instantly when jobs complete
  • Reduced API calls - No need for repeated polling requests
  • Better scalability - Handle high volumes of concurrent extractions efficiently
  • Automatic retries - Failed deliveries will be retried with exponential backoff

Setting Up Webhooks

Use the webhook endpoint to generate your webhook configuration portal link:

Step 2: Configure in Portal

The webhook configuration portal allows you to:
  • Add Multiple Endpoints - Configure different URLs for different event types
  • Set Authentication - Add headers or basic auth to your webhooks
  • Filter Events - Choose which events to receive at each endpoint
  • Test Endpoints - Send test events to verify your setup
  • View Logs - See delivery attempts and debug failed webhooks

Step 3: Implement Your Webhook Handler

Create an endpoint in your application to receive webhook notifications:

Webhook Security

Each webhook request includes security headers for verification:
The signature is computed using HMAC-SHA256 with your webhook secret.

Webhook Events

When webhooks are configured, you’ll receive events for job status changes:

Event Types

Job Completed Event

Job Failed Event

Example Implementations

Webhook Handlers

Complete Integration Example

Here’s a complete example integrating async extraction with webhook handling:

Best Practices

1. Idempotent Processing

Design your webhook handlers to be idempotent, as webhooks may be delivered multiple times:

2. Quick Response Times

Respond to webhooks quickly (within 5 seconds) to avoid timeouts:

3. Error Handling

Implement comprehensive error handling:

Testing Webhooks Locally

Use ngrok or similar tools to test webhooks during development:

Troubleshooting

Common Issues

  1. Webhook signature verification fails
    • Ensure you’re using the correct webhook secret from the portal
    • Check that you’re passing the raw request body for verification
    • Verify headers are being passed correctly (case-sensitive)
  2. Webhooks not being received
    • Confirm your endpoint is publicly accessible
    • Check the portal logs for delivery attempts
    • Ensure your endpoint returns 2xx status codes
  3. Replay attacks
    • The 5-minute timestamp window prevents replay attacks
    • Store and check event IDs to prevent duplicate processing

Async Processing

Learn about asynchronous document processing

API Reference

View the webhook endpoint documentation

Poll Endpoint

Alternative method for checking job status

Error Handling

Handle errors in your integration