Webhooks allow you to receive real-time HTTP notifications when events occur in your SendPilot workspace. Instead of polling the API, webhooks push data to your server as events happen.Documentation Index
Fetch the complete documentation index at: https://docs.sendpilot.ai/llms.txt
Use this file to discover all available pages before exploring further.
How Webhooks Work
- An event occurs in SendPilot (e.g., a lead replies to a message)
- SendPilot sends an HTTP POST request to your webhook URL
- Your server processes the event and returns a 2xx response
- SendPilot marks the delivery as successful
Available Events
Message Events
message.sent- Message sent to a leadreply.received- Reply received from a lead
Connection Events
connection_request.sent- Connection request sentconnection_request.accepted- Connection accepted
Campaign Events
campaign.started- Campaign startedcampaign.paused- Campaign pausedcampaign.resumed- Campaign resumedcampaign.finished- Campaign finished
Lead Events
lead.tag.updated- Lead tags updatedlead.updated- Lead status updated
Lead Database Events
lead_database.search.completed- Search completed with all leads
Lead Extractor Events
lead_extractor.job.completed- Extraction job completed with all leads
Webhook Payload Structure
All webhook payloads follow a consistent structure:| Field | Type | Description |
|---|---|---|
eventId | string | Unique identifier for this event (use for idempotency) |
eventType | string | The type of event that occurred |
timestamp | string | ISO 8601 timestamp when the event occurred |
workspaceId | string | Your workspace ID |
data | object | Event-specific payload data |
Delivery & Retries
SendPilot uses reliable webhook delivery with automatic retries:- Timeout: Your endpoint must respond within 30 seconds
- Success: Any 2xx response is considered successful
- Retries: Failed deliveries are retried with exponential backoff:
- 1st retry: 5 seconds
- 2nd retry: 30 seconds
- 3rd retry: 2 minutes
- 4th retry: 15 minutes
- 5th retry: 1 hour
- Max retries: 5 attempts total
Security
Signature Verification
All webhook requests include a signature header for verification:IP Allowlisting
For additional security, you can allowlist SendPilot’s webhook IPs. Contact support for the current IP ranges.Best Practices
Respond quickly
Respond quickly
Return a 2xx response as fast as possible. Process events asynchronously to avoid timeouts.
Handle duplicates
Handle duplicates
Use the
eventId field for idempotency. The same event may be delivered multiple times in rare cases.Verify signatures
Verify signatures
Always verify the webhook signature to ensure the request came from SendPilot.
Log everything
Log everything
Log incoming webhooks for debugging. This helps troubleshoot integration issues.
Use HTTPS
Use HTTPS
Always use HTTPS endpoints to protect sensitive data in transit.
Handle large payloads
Handle large payloads
Lead Database and Lead Extractor webhooks include full lead data. Process these asynchronously for large result sets.
Next Steps
Set Up Webhooks
Learn how to configure webhook subscriptions