Registers a callback URL for the on-call or post-call event. Wavix sends a POST callback to the URL when the event occurs. Creates persistent configuration that forwards call metadata to the URL on every matching call until the webhook is deleted.
Behavior: Without expected_url, the webhook is set to url whatever it was before. With expected_url, the webhook is set only while it currently has that URL; an empty string matches an unset webhook. Otherwise the call returns 409 and the webhook is unchanged. Setting the URL the webhook already has succeeds. If the call returns a Something went wrong error, the webhook is unchanged and you can retry the request.
Wavix API key. Pass as Authorization: Bearer <api_key>. Keys support per-resource scopes (none / read / write). See Restricted keys and scopes.
Attributes for the new call webhook.
Webhook URL to send call events to.
"https://you-site.com/webhook"
Allowed values: on-call, post-call.
on-call: Sends real-time status updates
when a call starts, is answered, and ends.
post-call: Sends a callback after the call ends
with disposition, duration, and cost.
post-call, on-call Applies the change only if the webhook currently has this URL. Pass an empty string to set the webhook only while it is unset, or your own URL to replace your webhook. Setting the URL the webhook already has always succeeds.
""
Returns the created call webhook.
A call webhook response
Indicates whether the request was successful.
true
Type of call event the webhook subscribes to. One of post-call (delivered once after the call ends) or on-call (delivered for in-call events while the call is active).
post-call, on-call "post-call"
Webhook URL
"https://you-site.com/webhook"