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
- Register a webhook endpoint with a URL and the event types you want
- When a matching event occurs, Oktivo sends a POST request to your URL
- Your server processes the payload and returns a
200response - 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 theagentId 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
HMAC Signature Verification
Every webhook request includes anx-oktivo-signature header containing an HMAC-SHA256 signature. Verify it to ensure the request came from Oktivo:
secret is returned when you create the webhook endpoint. Store it securely.
Delivery & Retries
- Oktivo expects a
2xxresponse 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
200immediately, then process asynchronously - Use idempotency keys (the
contactUID+ event type) to handle duplicate deliveries - Set up agent filtering to keep webhook handlers focused