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 leadmessage.received- Reply received from a lead
Connection Events
connection.sent- Connection request sentconnection.accepted- Connection accepted
Campaign Events
campaign.started- Campaign startedcampaign.paused- Campaign pausedcampaign.resumed- Campaign resumed
Lead Events
lead.status.changed- Lead status updated
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.
Next Steps
Set Up Webhooks
Learn how to configure webhook subscriptions