Skip to content
VoiceMint Developers

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#

EventWhen
call.starteda phone call with an agent started
call.endeda call ended: duration, billable minutes, transcript summary, sentiment, dispositions
call.faileda call could not be placed or dropped with an error
disposition.createda call outcome was recorded
call.voicemaila caller left an after-hours voicemail
call.ivr_selecteda caller chose an option in a keypad menu
call.callback_scheduledan agent scheduled a call back the caller asked for
chat.messagean agent replied in a chat (web or WhatsApp)
booking.created / booking.updated / booking.cancelledan appointment on a connected calendar
workflow.completed / workflow.faileda workflow run finished
workflow.approval_requesteda workflow run waits for an approval
workflow.notificationa 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:

HeaderValue
X-VoiceMint-Signaturesha256=<hex HMAC-SHA256 of "{timestamp}.{raw body}" with your secret>
X-VoiceMint-Timestampunix seconds when it was signed
X-VoiceMint-Eventthe event name
X-VoiceMint-Delivery-Idunique 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).