Overview
Webhooks allow your application to receive real-time notifications when events occur in your Vambe account. Instead of polling for changes, Vambe will send HTTP POST requests to your specified endpoint when events happen.Common Use Cases
- Message Notifications: Get notified when customers send messages
- Ticket Updates: Track when tickets are created, updated, or closed
- Pipeline Changes: Monitor when contacts move through pipeline stages
- Contact Events: Know when new contacts are created
- Integration Sync: Keep external systems in sync with Vambe data
How Webhooks Work
- Configure Webhook: Set up a webhook URL in your Vambe account
- Events Occur: Customer sends message, ticket created, stage changed, etc.
- Vambe Sends Request: HTTP POST sent to your webhook URL
- Your Server Responds: Process the event and return 200 OK
- Retry Logic: If your server doesnβt respond, Vambe retries
Webhook Management API
Use the webhooks API to manage your webhook configurations programmatically.Available Endpoints
Check the Automation & Pipelines API tab for webhook management endpoints:- Create Webhook:
POST /api/webhooks
- List Webhooks:
GET /api/webhooks
- Get Webhook:
GET /api/webhooks/{id}
- Update Webhook:
PUT /api/webhooks/{id}
- Delete Webhook:
DELETE /api/webhooks/{id}
- Restore Webhook:
POST /api/webhooks/{id}/restore
- Get Topics:
GET /api/webhooks/topics
- Get Webhook Calls:
GET /api/webhooks/calls
Event Types (Topics)
Subscribe to specific events to receive notifications:Message Events
message.received
- Customer sends an inbound message
message.sent
- Your team sends an outbound message
Ticket Events
ticket.created
- New support ticket opened
ticket.updated
- Ticket status or assignment changes
ticket.closed
- Ticket is resolved/closed
Contact Events
contact.created
- New contact added to system
contact.updated
- Contact information modified
Pipeline Events
stage.changed
- Contact moves to different pipeline stage
Webhook Payload Structure
When an event occurs, Vambe sends a POST request to your webhook URL:Setting Up Webhooks
1. Create a Webhook Endpoint
Your server must have an endpoint that:- Accepts POST requests
- Returns 200 OK status
- Responds within 5 seconds
- Processes events asynchronously (donβt block the response)
2. Configure in Vambe
Use the API to create a webhook configuration:3. Test Your Webhook
- Send a test message to trigger the webhook
- Check your server logs to verify receipt
- Ensure youβre returning 200 OK
Security Best Practices
- Validate Requests: Verify requests are from Vambe
- Use HTTPS: Always use secure endpoints
- Verify Signatures: Check webhook signatures if provided
- Rate Limiting: Implement rate limiting on your endpoint
- Idempotency: Handle duplicate events gracefully
Error Handling
If your webhook endpoint fails to respond:- Retry Logic: Vambe will retry failed webhooks
- Backoff Strategy: Increasing delays between retries
- Max Retries: After several failures, webhook may be disabled
- Monitor Logs: Check webhook call logs via API
Real-World Use Cases
Use Case 1: Auto-Response to High-Priority Messages
Use Case 2: CRM Integration on Ticket Creation
Use Case 3: Update Analytics on Stage Change
Use Case 4: Auto-Assignment Based on Message Content
Webhook Management with API
Create a Webhook
List All Webhooks
Update Webhook
Delete Webhook
Get Available Topics
View Webhook Call History
Debugging Webhooks
Log Everything During Development
Test Webhook Locally with ngrok
Common Issues
Issue: Webhook not receiving events- β
Verify webhook is active (
GET /api/webhooks
) - β Check URL is publicly accessible
- β Verify subscribed to correct topics
- β Check firewall/security groups
- β Implement idempotency with event IDs
- β Track processed events in database
- β Return 200 OK even if duplicate
- β Process events asynchronously
- β Return 200 OK immediately
- β Donβt wait for external API calls
Advanced Patterns
Idempotency Pattern
Queue-Based Processing
Event Filtering
Related Resources
- Webhook API Reference - Full webhook management endpoints
- Analytics - Monitor webhook event patterns
- Integration Guide - API integration overview
- Contact Management - Webhook data usage