Webhooks API
Receive and process webhook events from external providers
Webhooks API
Receive webhook events from external providers to trigger workflows. Webhooks are automatically verified, stored for audit, and routed to matching workflows.
Webhook endpoints do not require API key authentication - they use provider-specific signature verification instead.
Provider Webhook Endpoints
Each provider has a dedicated endpoint that handles signature verification and event routing.
| Provider | Endpoint | Signature Header |
|---|---|---|
| Stripe | POST /webhooks/stripe/:companyId | stripe-signature |
| HubSpot | POST /webhooks/hubspot/:companyId | x-hubspot-signature-v3 |
| QuickBooks | POST /webhooks/quickbooks/:companyId | intuit-signature |
| Salesforce | POST /webhooks/salesforce/:companyId | N/A (SOAP XML) |
| PandaDoc | POST /webhooks/pandadoc/:companyId | x-pandadoc-signature |
| NetSuite | POST /webhooks/netsuite/:companyId | x-netsuite-signature |
| Gmail | POST /webhooks/gmail/:companyId | N/A (Pub/Sub) |
| Custom | POST /webhooks/custom/:companyId/:path | N/A |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
companyId | string | Your company UUID |
path | string | Custom path for routing (custom webhooks only) |
Standard Response
All webhook endpoints return the same response format:
| Field | Type | Description |
|---|---|---|
received | boolean | Always true on success |
eventId | string | Internal event ID for tracking |
workflowsTriggered | number | Number of workflows triggered |
Stripe Webhooks
Receive events from Stripe for payment and subscription events.
Headers
| Header | Required | Description |
|---|---|---|
stripe-signature | Yes | Stripe webhook signature |
Content-Type | Yes | application/json |
Common Event Types
| Event | Description |
|---|---|
invoice.paid | Invoice was paid |
invoice.payment_failed | Payment attempt failed |
customer.subscription.created | New subscription |
customer.subscription.updated | Subscription changed |
customer.subscription.deleted | Subscription cancelled |
payment_intent.succeeded | Payment completed |
payment_intent.payment_failed | Payment failed |
charge.refunded | Charge was refunded |
Example Payload
Stripe Configuration
- Go to Stripe Dashboard → Developers → Webhooks
- Add endpoint:
https://your-api.com/webhooks/stripe/{companyId} - Select events to receive
- Copy the signing secret to your environment
HubSpot Webhooks
Receive CRM and marketing events from HubSpot.
Headers
| Header | Required | Description |
|---|---|---|
x-hubspot-signature-v3 | Yes | HubSpot v3 signature |
Content-Type | Yes | application/json |
Common Event Types
| Event | Description |
|---|---|
contact.creation | New contact created |
contact.propertyChange | Contact property updated |
contact.deletion | Contact deleted |
deal.creation | New deal created |
deal.propertyChange | Deal property updated |
company.creation | New company created |
Example Payload
HubSpot Configuration
- Go to HubSpot Settings → Integrations → Private Apps
- Create or edit your app
- Go to Webhooks tab
- Add subscription URL:
https://your-api.com/webhooks/hubspot/{companyId} - Select object types and events
QuickBooks Webhooks
Receive accounting events from QuickBooks Online.
Headers
| Header | Required | Description |
|---|---|---|
intuit-signature | Yes | Intuit webhook signature |
Content-Type | Yes | application/json |
Common Event Types
| Event | Description |
|---|---|
Customer | Customer created/updated/deleted |
Invoice | Invoice created/updated/deleted |
Payment | Payment recorded |
Bill | Bill created/updated |
Vendor | Vendor created/updated |
Account | Account created/updated |
Example Payload
QuickBooks Configuration
- Go to Intuit Developer Portal → My Apps
- Select your app → Webhooks
- Add endpoint:
https://your-api.com/webhooks/quickbooks/{companyId} - Select entities to subscribe to
- Copy the verifier token to your environment
Salesforce Webhooks
Receive events from Salesforce via outbound messages or Platform Events.
Content Types
| Content-Type | Format | Description |
|---|---|---|
text/xml | SOAP XML | Outbound messages from Workflow Rules |
application/xml | SOAP XML | Outbound messages (alternate) |
application/json | JSON | Platform Events, Change Data Capture |
SOAP XML Response
For outbound messages, Salesforce expects a SOAP acknowledgment:
Common Event Types
| Event | Description |
|---|---|
Account | Account record changes |
Contact | Contact record changes |
Opportunity | Opportunity record changes |
Lead | Lead record changes |
Case | Case record changes |
| Custom objects | Any custom object changes |
Example JSON Payload (Change Data Capture)
Salesforce Configuration
For Outbound Messages:
- Setup → Workflow Rules → Create new rule
- Add Outbound Message action
- Set endpoint URL:
https://your-api.com/webhooks/salesforce/{companyId}
For Change Data Capture:
- Setup → Change Data Capture
- Select objects to track
- Configure external client with endpoint
PandaDoc Webhooks
Receive document lifecycle events from PandaDoc.
Headers
| Header | Required | Description |
|---|---|---|
x-pandadoc-signature | Yes | PandaDoc webhook signature |
Content-Type | Yes | application/json |
Common Event Types
| Event | Description |
|---|---|
document_state_changed | Document status changed |
recipient_completed | Recipient signed/completed |
document_completed | All recipients completed |
document_paid | Document payment received |
document_viewed | Document was viewed |
document_deleted | Document was deleted |
Example Payload
PandaDoc Configuration
- Go to PandaDoc Settings → Integrations → Webhooks
- Add webhook URL:
https://your-api.com/webhooks/pandadoc/{companyId} - Select events to receive
- Copy the shared key for signature verification
NetSuite Webhooks
Receive events from NetSuite via RESTlet or SuiteScript.
Headers
| Header | Required | Description |
|---|---|---|
x-netsuite-signature | No | Optional signature for verification |
Content-Type | Yes | application/json |
Common Event Types
| Event | Description |
|---|---|
record.create | Record created |
record.update | Record updated |
record.delete | Record deleted |
scheduled.script | Scheduled script event |
Example Payload
NetSuite Configuration
- Create a RESTlet or SuiteScript that POSTs to your webhook endpoint
- Configure User Event Scripts to trigger on record changes
- Set up a Scheduled Script for periodic events
Gmail Webhooks
Receive email notifications via Google Cloud Pub/Sub.
Gmail uses Google Cloud Pub/Sub for push notifications. You need to configure a Pub/Sub topic and subscription.
Pub/Sub Message Format
The data field is base64-encoded JSON containing:
Gmail Configuration
- Enable Gmail API in Google Cloud Console
- Create a Pub/Sub topic
- Create a push subscription with endpoint:
https://your-api.com/webhooks/gmail/{companyId} - Call
users.watch()to start receiving notifications
Custom Webhooks
Receive events from any external system with a flexible endpoint.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
companyId | string | Your company UUID |
path | string | Custom path used as event type |
Example
The path parameter becomes the event type for workflow matching. In the example above, workflows with trigger webhook.custom.order-received would be triggered.
Non-JSON Payloads
Custom webhooks accept any content type. Non-JSON payloads are wrapped:
System Webhooks
These endpoints are used by internal services and typically don't need manual configuration.
Nango Webhooks
Receives OAuth completion and sync events from Nango.
| Header | Description |
|---|---|
x-nango-signature | HMAC-SHA256 signature |
Event Types:
| Type | Description |
|---|---|
auth | OAuth flow completed (success or failure) |
sync | Data sync completed |
webhook | Forwarded provider webhook |
Trigger.dev Webhooks
Receives run status updates from Trigger.dev.
| Header | Description |
|---|---|
x-trigger-signature | HMAC-SHA256 signature |
Event Types:
| Type | Description |
|---|---|
run.completed | Workflow run completed successfully |
run.failed | Workflow run failed |
run.cancelled | Workflow run was cancelled |
Webhook Events
All incoming webhooks are stored in the webhook_events table for audit and replay.
Event Structure
Signature Verification Status
| Status | Description |
|---|---|
pending | Verification not yet attempted |
verified | Signature verified successfully |
failed | Signature verification failed |
skipped | No signature provided/required |
Event Processing Status
| Status | Description |
|---|---|
received | Event received and stored |
processing | Currently triggering workflows |
processed | All workflows triggered successfully |
failed | Processing failed |
ignored | No matching workflows found |
Signature Verification
How Verification Works
- Provider sends webhook with signature header
- API verifies signature using stored webhook secret
- If verification fails, returns
401 Unauthorized - If verification succeeds, processes the event
Stripe Signature Verification
HubSpot Signature Verification (v3)
QuickBooks Signature Verification
Error Responses
Invalid Signature (401)
Invalid JSON (400)
Invalid Payload (400)
Invalid Pub/Sub Message (400)
Rate Limiting
Webhook endpoints have a higher rate limit than standard API endpoints:
| Category | Limit |
|---|---|
| Webhooks | 10,000 requests/minute per IP |
When rate limited:
Outbound Webhooks
Register webhook endpoints to receive notifications when workflow execution status changes.
Outbound webhooks notify your systems about workflow events. This is the inverse of inbound webhooks which trigger workflows.
Webhook Endpoint Management
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/webhook-endpoints | List webhook endpoints |
| POST | /api/v1/webhook-endpoints | Create webhook endpoint |
| GET | /api/v1/webhook-endpoints/:id | Get endpoint details |
| PUT | /api/v1/webhook-endpoints/:id | Update endpoint |
| DELETE | /api/v1/webhook-endpoints/:id | Delete endpoint |
| POST | /api/v1/webhook-endpoints/:id/rotate-secret | Rotate signing secret |
| POST | /api/v1/webhook-endpoints/:id/test | Send test webhook |
| GET | /api/v1/webhook-endpoints/:id/deliveries | List delivery attempts |
| POST | /api/v1/webhook-endpoints/:id/deliveries/:deliveryId/retry | Retry failed delivery |
Create Webhook Endpoint
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Endpoint name |
url | string | Yes | Webhook URL (HTTPS recommended) |
events | string[] | No | Event types to receive (null = all events) |
workflowIds | string[] | No | Filter to specific workflows (null = all) |
headers | object | No | Custom headers to include |
description | string | No | Description |
Example Request
Response (201 Created)
The secret is only returned on creation. Store it securely for signature verification.
Webhook Event Types
| Event | Description |
|---|---|
workflow.started | Workflow execution began |
workflow.completed | Workflow completed successfully |
workflow.failed | Workflow failed with error |
workflow.timeout | Workflow exceeded timeout |
workflow.cancelled | Workflow was cancelled |
workflow.checkpoint | Long-running workflow checkpoint |
Webhook Payload Format
Failed Workflow Payload
Signature Verification
Webhooks are signed using HMAC-SHA256 (Stripe-style format).
Headers Sent
| Header | Description |
|---|---|
X-Webhook-Signature | Signature: t={timestamp},v1={signature} |
X-Webhook-ID | Unique event ID |
X-Webhook-Timestamp | Unix timestamp |
Content-Type | application/json |
Verification Example (Node.js)
Delivery Retry Strategy
Failed deliveries are automatically retried with exponential backoff:
| Attempt | Delay |
|---|---|
| 1 | 10 seconds |
| 2 | 30 seconds |
| 3 | 1 minute |
| 4 | 5 minutes |
| 5 | 15 minutes |
| 6 | 1 hour |
| 7 | 6 hours |
| 8 | 24 hours |
After 8 failed attempts, the delivery is marked as permanently failed.
Circuit Breaker
After 10 consecutive failures, the endpoint is automatically disabled to prevent continued failures. Re-enable by updating the endpoint status:
Test Webhook
Send a test webhook to verify your endpoint is working:
Response:
List Delivery History
Response:
Manually Retry Delivery
Response:
Workflow Trigger Configuration
To trigger workflows from webhooks, configure the trigger in your workflow definition:
Stripe Example
HubSpot Example
Custom Example
Testing Webhooks
Using cURL
Stripe CLI
ngrok for Local Development
Best Practices
Idempotency
Always design workflows to handle duplicate events:
- Providers may retry failed deliveries
- Use
eventIdto deduplicate - Make actions idempotent where possible
Quick Response
Webhook endpoints should respond quickly:
- Return
200immediately - Process workflows asynchronously
- Avoid long-running operations in webhook handler
Monitoring
Monitor webhook health:
- Track
signatureVerifiedstatus for security issues - Monitor
statusfor processing failures - Alert on high
ignoredrates
Security
- Always verify signatures when available
- Use HTTPS in production
- Store webhook secrets securely
- Rotate secrets periodically