Skip to main content

Webhooks

Webhooks deliver real-time notifications to your application when events occur in Oktivo. Instead of polling for results, your server receives a POST request as soon as something happens.

Event Types

How It Works

  1. Register a webhook endpoint with a URL and the event types you want
  2. When a matching event occurs, Oktivo sends a POST request to your URL
  3. Your server processes the payload and returns a 200 response
  4. If delivery fails, Oktivo retries with exponential backoff

Payload Structure

Every webhook payload includes:

Agent Filtering

You can scope a webhook endpoint to only receive events from a specific agent by setting the agentId field when creating the endpoint. This is useful when:
  • Different CRMs handle different agents
  • You want to route events to different processing pipelines
  • Multiple teams share an Oktivo account
See the Webhook Filtering Guide for details.

HMAC Signature Verification

Every webhook request includes an x-oktivo-signature header containing an HMAC-SHA256 signature. Verify it to ensure the request came from Oktivo:
The secret is returned when you create the webhook endpoint. Store it securely.

Delivery & Retries

  • Oktivo expects a 2xx response within 10 seconds
  • Failed deliveries are retried up to 5 times with exponential backoff
  • After all retries are exhausted, the endpoint is marked as failing
  • You can view delivery logs in the dashboard

Best Practices

  • Always verify the HMAC signature before processing
  • Return 200 immediately, then process asynchronously
  • Use idempotency keys (the contactUID + event type) to handle duplicate deliveries
  • Set up agent filtering to keep webhook handlers focused