Register the webhook for mid-call questions
Changed onRegister the HTTPS endpoint we POST to when the agent needs an answer from you during a call (a hostess asking for a callback number, or an IVR wanting a choice). If you subscribe with events, it also receives call_completed when a call finishes. Without one, those questions arrive on GET /calls/{call_id}/events and in pending_questions on GET /calls/{call_id}. While the subscription includes ask_user (the default), the same question goes to both channels carrying the same request_id; answer either, and deduplicate on that id. Reply 200 with an answer field to answer inline, or 202 and then POST /calls/{call_id}/answer when you have it. One 60-second budget covers the POST and the wait after it, and the callee is on hold for all of it.
Request
- Base URLhttps://api.voygr.tech
- URLhttps://api.voygr.tech/users/me/webhook
- AuthAPI key in header X-API-Key
Request body
Example request
{
"events": [
"ask_user",
"call_completed"
],
"regenerate_secret": true,
"url": "https://hooks.example.com/callwright"
}Response
Registered. The secret is present only when this request issued one, and is shown once.
Example response
{
"events": [
"ask_user",
"call_completed"
],
"secret": "q3Jv8kX0bF5yW2mN7tL1cR9eHs4dZa6pU0iOgVnYxEw",
"url": "https://hooks.example.com/callwright"
}Changes
- breaking
the
request property's minLength was increased from0to1 - breaking
response property
secretlist-of-types was widened by adding typesnullto media typeapplication/jsonof response200 - warning
the
request property's maxLength was set to2000
- breaking
- info
added the new optional request property
- info
added the optional property
to the response with the status
- info