Overview
Webhooks allow you to receive real-time notifications when events occur in your Parallel API operations, eliminating the need for constant polling. Our webhooks follow standard webhook conventions to ensure security and interoperability.Setup
1. Record your webhook secret
Go to Settings → Webhooks to view your account webhook secret. You’ll need this to verify webhook signatures.Keep your webhook secret secure. Anyone with access to your secret can forge webhook requests.
2. Configure webhook in API request
When creating a task run or Find All run, include awebhook parameter in your request:
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Your webhook endpoint URL. Can be any domain. |
event_types | array[string] | Yes | Array of event types to subscribe to. See API-specific documentation for available event types. |
3. Webhook request headers
Your webhook endpoint will receive requests with these headers:webhook-id: Unique identifier for each webhook eventwebhook-timestamp: Unix timestamp in secondswebhook-signature: One or more versioned signatures (e.g.,v1,<base64 signature>)
Security & Verification
HMAC Signature Verification
Webhook requests are signed using HMAC-SHA256 with standard Base64 (RFC 4648) encoding with padding. The signature header is formatted asv1,<base64 signature> where <base64 signature> is computed over the payload below:
<webhook-id>: The value of thewebhook-idheader<webhook-timestamp>: The value of thewebhook-timestampheader<payload>: The exact JSON body of the webhook request
webhook-signature header uses space-delimited signatures; check each signature until one matches.
Verification Examples
Retry Policy
Webhook delivery uses the following retry configuration:- Initial delay: 5 seconds
- Backoff strategy: Exponential backoff (doubles per failed request)
- Maximum retries: Multiple attempts over 48 hours
Best Practices
1. Always Return 2xx Status
Your webhook endpoint should return a 2xx HTTP status code to acknowledge receipt. Any other status code will trigger retries.2. Verify Signatures
Always verify HMAC signatures using your account webhook secret from Settings → Webhooks to ensure webhook authenticity. Ensure that you are calculating signatures using the proper process as shown above.3. Handle Duplicates
Although not common, duplicate events may be sent to the configured webhook URL. Ensure your webhook handler can detect and safely ignore duplicate events using thewebhook-id header.
4. Process Asynchronously
Process webhook events asynchronously to avoid timeouts and ensure quick response times. For example, immediately return a 200 response, then queue the event for background processing.5. Rotate Secrets Carefully
When rotating webhook secrets in Settings → Webhooks, consider keeping the old secret active temporarily to avoid verification failures during the transition period.6. Monitor Webhook Health
Track webhook delivery failures and response times. Set up alerts for repeated failures that might indicate issues with your endpoint.API-Specific Documentation
For details on specific webhook events and payloads for each API:- Task API Webhooks: Task run completion events
- Find All Webhooks: Candidate and run events