Webhooks Overview

Webhooks enable real-time event-driven communication between the 8bit-ai platform and your application. Receive instant notifications when events occur in your account, such as new conversations, message receipts, or agent deployments.

app.8bit-ai.com
Webhooks page

What are Webhooks?

Webhooks are HTTP callbacks that deliver event data to your specified endpoint URL. Unlike polling, webhooks push data immediately when events happen, enabling real-time integrations with minimal latency and overhead.

How Webhooks Work

When a subscribed event occurs, the 8bit-ai platform sends an HTTP POST request to your configured endpoint URL with a JSON payload containing the event data. Each webhook delivery includes metadata about the event type, timestamp, and the associated resource.

Delivery Flow

1

Event Occurs

An event is triggered in the platform (e.g., message received, agent deployed).

2

Payload Prepared

The platform constructs a JSON payload with event details, signs it with your secret key, and queues it for delivery.

3

HTTP POST Sent

An HTTP POST request is sent to your endpoint URL with the signed JSON payload.

4

Acknowledgment

Your server must respond with a 2xx status code within 5 seconds to confirm receipt. Non-2xx responses trigger the retry mechanism.

Common Use Cases

Webhooks enable a wide range of real-time integrations:

  • Real-time analytics — Track conversation volume, user engagement, and agent performance as events happen.
  • CRM synchronization — Automatically log conversations and user interactions in your CRM system.
  • Custom notifications — Send alerts to internal systems when specific events occur, such as agent failures or high-traffic periods.
  • External processing — Route messages to external AI models or processing pipelines before delivering responses.
  • Audit logging — Maintain a comprehensive audit trail of all platform events for compliance and monitoring.

Security & Signature Verification

Every webhook payload is signed using HMAC-SHA256 with your unique webhook secret key. This signature is included in the X-8bit-Signature-256 header, allowing you to verify that the request is genuinely from the 8bit-ai platform and has not been tampered with during transit.

Always Verify Signatures

Signature verification is critical for security. Without it, malicious actors could send forged webhook requests to your endpoint. Always verify the signature before processing any webhook payload.

Signature Verification

Signature Headers

HeaderDescription
X-8bit-Signature-256HMAC-SHA256 signature of the raw request body
X-8bit-TimestampUnix timestamp when the webhook was sent
X-8bit-Event-IdUnique identifier for this webhook delivery

Retry Mechanism

If your endpoint does not respond with a 2xx status code within 5 seconds, the webhook delivery is considered failed and enters the retry queue.

Retry Schedule

AttemptDelay
110 seconds
21 minute
35 minutes
415 minutes
51 hour
6 - Final6 hours

After 6 failed delivery attempts (spanning approximately 7 hours), the webhook is permanently failed and logged in the webhook delivery logs. You can manually retry failed webhooks from the dashboard.

Idempotency

Webhook events include a unique id field. Use this field to ensure idempotent processing — store processed event IDs and skip any duplicates. This protects against processing the same event multiple times if retries occur.

Best Practices

Respond Quickly

Respond with a 200 status immediately after receiving the webhook, then process the event asynchronously. This prevents timeouts and reduces retry pressure.

Verify Signatures

Always verify the HMAC signature before processing. Use constant-time comparison to prevent timing attacks.

Log Deliveries

Log all webhook deliveries including event IDs, timestamps, and processing results for debugging and audit purposes.

Use HTTPS

Always use HTTPS endpoints in production. The platform will refuse to deliver webhooks to non-HTTPS URLs.

Handle Duplicates

Implement idempotent event processing using the event ID to safely handle duplicate deliveries from retries.

Continue learning about webhooks with these guides.