Skip to main content

Overview

Our webhook system enables real-time notifications for message events in your conversations. When a message is created or processed in your conversation, our system sends HTTP POST requests to your configured webhook URL with detailed message information.

Quick Start

1. Configure Webhook

Add a webhook URL to your conversation configuration:

2. Implement Webhook Handler

  • Django
  • FastAPI
  • Flask
  • Express.js
  • Spring Boot
  • PHP

Technical Specifications

Delivery System

  • Protocol: HTTPS only (for security)
  • Method: POST
  • Content-Type: application/json
  • Timeout: 30 seconds per request
  • Retry Logic: 3 attempts with exponential backoff

Retry Configuration

  • Maximum Attempts: 3
  • Backoff Schedule:
    • 1st retry: 4 seconds wait
    • 2nd retry: 8 seconds wait
    • 3rd retry: 10 seconds wait
  • Retry Conditions:
    • Network errors
    • Timeouts
    • Non-2xx responses

Security Requirements

  • HTTPS protocol mandatory
  • Valid SSL certificate
  • Public endpoint accessibility
  • 2xx status code response expected
  • IP whitelist recommended
  • Request signing (optional but recommended)

Webhook Payload

Structure

Field Reference

Best Practices

Performance

  1. Quick Acknowledgment
    • Return 2xx status immediately
    • Process webhook data asynchronously
    • Keep handler logic minimal
    • Use background workers for processing
  2. Idempotency Handling

Error Handling

  1. Graceful Recovery
  2. Logging Best Practices

Testing & Development

Local Testing

  1. Using ngrok
  2. Manual Testing

Webhook Testing Tools

  1. webhook.site
    • Quick webhook inspection
    • Real-time request monitoring
    • Headers and payload validation
    • Response simulation
  2. Custom Test Suite

Monitoring & Troubleshooting

Health Checks

  1. Metrics to Monitor
    • Webhook delivery success rate
    • Average response time
    • Retry attempt counts
    • Error rates by type
    • Processing time distribution
  2. Alerting Rules
    • High error rate threshold
    • Response time degradation
    • Retry count spikes
    • Failed delivery clusters

Common Issues & Solutions

Debug Checklist

  • Verify webhook URL configuration
  • Check SSL certificate validity
  • Monitor server logs for errors
  • Validate payload format
  • Test endpoint accessibility
  • Verify network connectivity
  • Check rate limiting
  • Monitor system resources

Support

For webhook-related assistance, please provide:
  • Conversation ID
  • Message ID
  • Timestamp of issue
  • Server logs
  • Webhook configuration
  • Error messages
  • Retry attempt logs

Rate Limiting

  • Maximum 10 concurrent webhook deliveries
  • Maximum 100 webhooks per minute per endpoint
  • Automatic back-pressure handling
  • Rate limit headers included in responses