Webhooks
Receive signed HTTP callbacks for calls, chats, bookings and workflows; verify signatures, handle retries and watch delivery health.
Instead of polling, register an HTTPS endpoint and VoiceMint POSTs an event to it when something happens.
Events#
| Event | When |
|---|---|
call.started | a phone call with an agent started |
call.ended | a call ended: duration, billable minutes, transcript summary, sentiment, dispositions |
call.failed | a call could not be placed or dropped with an error |
disposition.created | a call outcome was recorded |
call.voicemail | a caller left an after-hours voicemail |
call.ivr_selected | a caller chose an option in a keypad menu |
call.callback_scheduled | an agent scheduled a call back the caller asked for |
chat.message | an agent replied in a chat (web or WhatsApp) |
booking.created / booking.updated / booking.cancelled | an appointment on a connected calendar |
workflow.completed / workflow.failed | a workflow run finished |
workflow.approval_requested | a workflow run waits for an approval |
workflow.notification | a workflow's notify step sent a message |
GET /agents/webhooks/events returns this list with descriptions.
Register an endpoint#
curl -X POST https://api.voicemint.io/api/v1/agents/webhooks \
-H "Authorization: Bearer $VOICEMINT_API_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://example.com/voicemint/events", "events": ["call.ended", "disposition.created"], "description": "CRM sync"}'The signing secret is returned once. Rotate it with POST /agents/webhooks/{id}/rotate-secret and send a test event with POST /agents/webhooks/{id}/test. You can also manage webhooks in the app under Agents → Webhooks (the developer console links there).
Verify the signature#
Every delivery carries:
| Header | Value |
|---|---|
X-VoiceMint-Signature | sha256=<hex HMAC-SHA256 of "{timestamp}.{raw body}" with your secret> |
X-VoiceMint-Timestamp | unix seconds when it was signed |
X-VoiceMint-Event | the event name |
X-VoiceMint-Delivery-Id | unique per delivery (use it to ignore duplicates) |
Compute the HMAC over the raw body bytes, compare in constant time, and reject timestamps older than five minutes (replays).
# verify by hand: the expected signature for a saved delivery
printf '%s.%s' "$TIMESTAMP" "$(cat body.json)" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET"Retries and health#
Answer 2xx within 10 seconds; do slow work after responding. A non-2xx answer or a timeout is retried up to 3 attempts with exponential backoff and jitter. Each event is delivered once per subscription, but a retry after a lost response can arrive twice: de-duplicate on X-VoiceMint-Delivery-Id.
GET /agents/webhooks/{id}/health reports the success rate over 24 hours and 7 days, latency and the last errors; GET /agents/webhooks/{id}/deliveries is the delivery log, and a failed delivery can be resent. An endpoint that keeps failing for a long time is disabled automatically (you get an email); re-enable it with POST /agents/webhooks/{id}/enable once it is fixed. The developer console's Webhooks page shows the health of all your endpoints.
Redirects are not followed, and endpoints must be public HTTPS URLs (private and internal addresses are refused).