WEBHOOK

Headers

X-VG-Event
enum<string>
required

The event type, same as the body's type.

Available options:
call.ended,
call.analyzed,
call.status_changed,
reachability.result,
reachability.completed,
campaign.started,
campaign.paused,
campaign.resumed,
campaign.completed,
campaign.canceled,
campaign.record.updated,
call.dispositioned,
dialer.contact_updated
X-VG-Delivery
string
required

Delivery id (whd_...), same as the body's id. Stays the same across retries of one delivery: use it to drop duplicates.

X-VG-Signature
string
required

t=<unix seconds>,v1=<hex HMAC-SHA256(secret, t + "." + raw body)>. t is the time of this delivery try. Verify it before trusting the body (see the Webhooks tag and the event descriptions).

Pattern: ^t=\d+,v1=[0-9a-f]{64}$
User-Agent
string
required

Always voice-gateway-webhooks/1.

Allowed value: "voice-gateway-webhooks/1"

Body

application/json
id
string
required

Delivery id (whd_...), same as X-VG-Delivery.

type
string
required
Allowed value: "call.ended"
created_at
string<date-time>
required

When the event happened (not the delivery try).

data
object
required

Response

200

Any 2xx status, within 10 seconds, acknowledges the delivery (the body is ignored). Anything else (other statuses, timeouts, connection errors) is retried: 8 tries in total, 30 seconds after the first failure, then doubling (30 s, 1 min, 2 min, 4 min, 8 min, 16 min, 32 min; about 63 minutes in all). Redirects are not a supported answer.