Webhook Implementation Guide
This guide shows you how to implement webhook handling for ContactManager events in different languages.Setup Steps
- Create webhook credentials in your dashboard at dash.contactsmanager.io/webhooks
- Set up a server endpoint to receive webhook events
- Verify webhook signatures to ensure security
- Handle different event types appropriately
Using Our SDKs
For the easiest implementation, use our official SDKs: Both SDKs provide built-in webhook signature verification.Handling Webhook Retries
ContactManager implements an automatic retry mechanism to ensure reliable delivery of webhook events:- We make up to 3 delivery attempts for each webhook (initial attempt + 2 retries)
- If your endpoint returns a non-2xx response code or times out, we retry automatically
- Retry schedule:
- First retry: 3 seconds after the initial attempt
- Second retry: 7 seconds after the first retry
Implementing Idempotency
Since a webhook may be delivered multiple times due to retries, your webhook handler should be idempotent (processing the same event multiple times should not cause duplicate effects). Here’s how to implement idempotency:- Use the unique webhook
id
field for deduplication - Before processing a webhook, check if you’ve already processed that ID
- If the ID has been processed, return a 200 response without further processing
Implementation Examples
First, install the ContactsManager SDK:Then implement your webhook handler:
Testing Your Webhook Implementation
- Deploy your webhook endpoint to a publicly accessible URL
- Register this URL in your ContactManager dashboard
- Generate test events in the dashboard to validate your implementation
- Check the logs to ensure events are being processed correctly