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
| Event | Description |
|---|---|
call.completed | A call has finished (either connected and ended, or was not answered). |
call.disposition_set | A disposition label was assigned to a completed call. |
call.escalated | A call was escalated to a human agent during the conversation. |
campaign.started | A scheduled campaign has begun dialing. |
campaign.paused | A running campaign was paused (via API or dashboard). |
campaign.completed | All contacts in a campaign have been attempted and the campaign is finished. |
Register a Webhook
POST /webhooks
Registers a new webhook endpoint to receive events for your workspace.
Request Body
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 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.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. Theevent 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.completed payload example
call.completed payload example
call.escalated Event
call.escalated payload example
call.escalated payload example
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 asecret, 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:
- Read the raw request body as bytes (do not parse JSON first).
- Compute the HMAC-SHA256 of the raw body using your secret as the key.
- Compare your computed digest to the value in
X-VInfer-Signature(after stripping thesha256=prefix). - Use a constant-time comparison to prevent timing attacks.
Retry Behavior
If your endpoint does not respond with a2xx status code within 10 seconds, VInfer treats the delivery as failed and retries with exponential backoff:
| Attempt | Delay after previous attempt |
|---|---|
| 1st retry | 1 minute |
| 2nd retry | 5 minutes |
| 3rd retry | 30 minutes |
| 4th retry | 2 hours |
| 5th retry | 8 hours |