Skip to main content

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

  1. Configure Webhook: Set up a webhook URL in your Vambe account
  2. Events Occur: Customer sends message, ticket created, stage changed, etc.
  3. Vambe Sends Request: HTTP POST sent to your webhook URL
  4. Your Server Responds: Process the event and return 200 OK
  5. 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
Note: The error_details field in message.sent is optional and only present when there are delivery errors.

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

  1. Validate Requests: Verify requests are from Vambe
  2. Use HTTPS: Always use secure endpoints
  3. Verify Signatures: Check webhook signatures if provided
  4. Rate Limiting: Implement rate limiting on your endpoint
  5. 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
Issue: Receiving duplicate events
  • βœ… Implement idempotency with event IDs
  • βœ… Track processed events in database
  • βœ… Return 200 OK even if duplicate
Issue: Webhook timing out
  • βœ… Process events asynchronously
  • βœ… Return 200 OK immediately
  • βœ… Don’t wait for external API calls

Advanced Patterns

Idempotency Pattern

Queue-Based Processing

Event Filtering