How Webhooks Work
- Register a webhook URL in your DelightLoop account settings
- DelightLoop sends HTTP POST requests to your URL when events occur
- Your server processes the webhook and responds with a 200 status code
Webhook Events
DelightLoop supports the following webhook events:campaign.created: A new campaign is createdcampaign.updated: A campaign is updatedcampaign.completed: A campaign is completedrecipient.status_changed: A recipient’s status changesrecipient.delivered: A gift is delivered to a recipientrecipient.acknowledged: A recipient acknowledges receiptcontact_list.created: A new contact list is createdcontact_list.updated: A contact list is updated
Webhook Payload Format
All webhooks follow this structure:Webhook Security
Signature Verification
DelightLoop signs all webhook requests with a secret key. Verify the signature to ensure the request is authentic:Headers
Webhook requests include the following headers:X-DelightLoop-Event: The event typeX-DelightLoop-Signature: HMAC SHA256 signatureX-DelightLoop-Timestamp: Unix timestamp of the eventContent-Type:application/json
Webhook Response
Your webhook endpoint should:- Return 200 OK within 5 seconds to acknowledge receipt
- Process the event asynchronously if handling takes longer
- Return appropriate error codes if processing fails
Retry Logic
If your webhook endpoint doesn’t respond with 200 OK, DelightLoop will retry:- Initial retry: After 1 minute
- Subsequent retries: Exponential backoff (2, 4, 8, 16 minutes)
- Maximum retries: 5 attempts
- Total time: Up to 31 minutes
Testing Webhooks
Use the webhook testing tool in your DelightLoop dashboard to send test events to your endpoint.Best Practices
- Verify signatures to ensure webhook authenticity
- Idempotency: Handle duplicate events gracefully
- Async processing: Process events asynchronously when possible
- Logging: Log all webhook events for debugging
- Error handling: Return appropriate status codes

