Skip to main content
Instead of polling the Calls API repeatedly to check for updates, you can register a webhook — an HTTPS endpoint on your server — and VInfer will push a POST request to it the moment a relevant event occurs. Webhooks make your integration event-driven: your system reacts to call completions, dispositions, and escalations in real time without any unnecessary API traffic.

Available Events


Register a Webhook

POST /webhooks Registers a new webhook endpoint to receive events for your workspace.

Request Body

string
required
The HTTPS URL on your server that will receive event payloads. Must be publicly reachable by VInfer’s servers. HTTP (non-TLS) URLs are not accepted.
array
required
Array of event type strings to subscribe to. You can subscribe to one or all available events. Example: ["call.completed", "call.escalated"]. Pass ["*"] to subscribe to all events.
string
Optional — a secret string used to sign webhook payloads with HMAC-SHA256. If provided, VInfer includes an X-VInfer-Signature header on every delivery so you can verify the payload originated from VInfer. See Signature Verification.

Example Request

Example Response


List Webhooks

GET /webhooks Returns all registered webhooks for your workspace, including their subscription status and last delivery result.

Example Request


Delete a Webhook

DELETE /webhooks/{id} Permanently removes a registered webhook. VInfer will stop sending events to the associated URL immediately. This action cannot be undone — if you need to re-enable the webhook, register it again via POST /webhooks.

Example Request


Event Payload Structure

All events share a common JSON envelope. The event field identifies the event type, id is a unique identifier for this delivery (useful for deduplication), timestamp is when the event was generated, and data contains the event-specific payload.

call.completed Event

call.escalated Event

Use the id field in the event envelope to implement deduplication in your handler. In rare cases (network retries, failover), your endpoint may receive the same event more than once — storing processed event IDs lets you safely skip duplicates.

Signature Verification

When you register a webhook with a secret, VInfer signs every payload using HMAC-SHA256 and includes the signature in the X-VInfer-Signature header as sha256=<hex_digest>. Verifying this signature confirms the payload genuinely came from VInfer and has not been tampered with. To verify:
  1. Read the raw request body as bytes (do not parse JSON first).
  2. Compute the HMAC-SHA256 of the raw body using your secret as the key.
  3. Compare your computed digest to the value in X-VInfer-Signature (after stripping the sha256= prefix).
  4. Use a constant-time comparison to prevent timing attacks.
Always verify the signature in production. Without verification, any party who discovers your webhook URL can send forged events to your endpoint. Never use string equality (===) for signature comparison — use a constant-time function to prevent timing side-channel attacks.

Retry Behavior

If your endpoint does not respond with a 2xx status code within 10 seconds, VInfer treats the delivery as failed and retries with exponential backoff: After 5 failed retries, VInfer stops attempting delivery for that event. The failed delivery is logged in the dashboard under Settings → Webhooks → Delivery Log so you can investigate and replay events manually if needed.
Respond with 200 OK as quickly as possible — ideally before doing any heavy processing. Push the event payload to an internal queue (e.g., Redis, SQS, or a database task table) and process it asynchronously. This keeps your endpoint fast and prevents timeouts from triggering unnecessary retries.