Skip to main content

Webhook Events

This page lists all webhook events available in the Audian API. You can subscribe to specific events or to all events using the wildcard *.

Subscribing to Events​

When registering a webhook, specify which events you want to receive:

# Subscribe to specific events
curl -X POST https://api.audian.com:8443/v2/webhooks \
-H "X-Auth-Token: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-domain.com/webhooks",
"events": ["call.initiated", "call.completed", "recording.completed"]
}'

# Subscribe to all events
curl -X POST https://api.audian.com:8443/v2/webhooks \
-H "X-Auth-Token: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-domain.com/webhooks",
"events": ["*"]
}'

Call Events​

call.initiated​

Fired when a call is initiated (either inbound or outbound).

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:30:00Z",
"event": "call.initiated",
"data": {
"call_id": "call_xyz789",
"call_type": "outbound",
"from": "+14155552671",
"to": "+14155552672",
"initiated_at": "2024-01-15T10:30:00Z"
}
}

call.ringing​

Fired when a call is ringing on the destination.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:30:02Z",
"event": "call.ringing",
"data": {
"call_id": "call_xyz789",
"ringing_at": "2024-01-15T10:30:02Z"
}
}

call.answered​

Fired when a call is answered.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:30:05Z",
"event": "call.answered",
"data": {
"call_id": "call_xyz789",
"answered_by": "+14155552672",
"answered_at": "2024-01-15T10:30:05Z"
}
}

call.completed​

Fired when a call ends normally.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:35:10Z",
"event": "call.completed",
"data": {
"call_id": "call_xyz789",
"duration": 305,
"status": "completed",
"from": "+14155552671",
"to": "+14155552672",
"ended_at": "2024-01-15T10:35:10Z",
"completion_reason": "normal"
}
}

call.failed​

Fired when a call fails to connect or ends abnormally.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:30:10Z",
"event": "call.failed",
"data": {
"call_id": "call_xyz789",
"status": "failed",
"reason": "no_answer",
"reason_code": 408,
"from": "+14155552671",
"to": "+14155552672",
"failed_at": "2024-01-15T10:30:10Z"
}
}

Possible reason values:

  • no_answer - Destination did not answer
  • declined - Call was explicitly declined
  • invalid_number - Invalid destination number
  • network_error - Network connectivity issue
  • internal_error - Internal system error
  • busy - Destination line is busy

call.cancelled​

Fired when a call is cancelled before being answered.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:30:08Z",
"event": "call.cancelled",
"data": {
"call_id": "call_xyz789",
"status": "cancelled",
"cancelled_at": "2024-01-15T10:30:08Z",
"cancelled_by": "caller"
}
}

Call Action Events​

call.transferred​

Fired when a call is transferred to another number.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:33:00Z",
"event": "call.transferred",
"data": {
"call_id": "call_xyz789",
"transfer_from": "+14155552672",
"transfer_to": "+14155552673",
"transferred_at": "2024-01-15T10:33:00Z"
}
}

call.held​

Fired when a call is placed on hold.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:33:30Z",
"event": "call.held",
"data": {
"call_id": "call_xyz789",
"held_at": "2024-01-15T10:33:30Z"
}
}

call.resumed​

Fired when a call is resumed from hold.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:34:00Z",
"event": "call.resumed",
"data": {
"call_id": "call_xyz789",
"resumed_at": "2024-01-15T10:34:00Z"
}
}

call.muted​

Fired when a call participant is muted.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:33:45Z",
"event": "call.muted",
"data": {
"call_id": "call_xyz789",
"muted_at": "2024-01-15T10:33:45Z"
}
}

call.unmuted​

Fired when a call participant is unmuted.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:34:15Z",
"event": "call.unmuted",
"data": {
"call_id": "call_xyz789",
"unmuted_at": "2024-01-15T10:34:15Z"
}
}

Recording Events​

recording.started​

Fired when call recording is started.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:30:05Z",
"event": "recording.started",
"data": {
"call_id": "call_xyz789",
"recording_id": "rec_abc123",
"started_at": "2024-01-15T10:30:05Z"
}
}

recording.stopped​

Fired when call recording is stopped.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:35:10Z",
"event": "recording.stopped",
"data": {
"call_id": "call_xyz789",
"recording_id": "rec_abc123",
"duration": 305,
"stopped_at": "2024-01-15T10:35:10Z"
}
}

recording.completed​

Fired when a call recording is fully processed and available for download.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:36:00Z",
"event": "recording.completed",
"data": {
"call_id": "call_xyz789",
"recording_id": "rec_abc123",
"duration": 305,
"file_size": 1024000,
"file_format": "mp3",
"download_url": "https://api.audian.com:8443/v2/recordings/rec_abc123/download",
"completed_at": "2024-01-15T10:36:00Z"
}
}

recording.failed​

Fired when recording fails to complete.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:36:00Z",
"event": "recording.failed",
"data": {
"call_id": "call_xyz789",
"recording_id": "rec_abc123",
"reason": "storage_error",
"failed_at": "2024-01-15T10:36:00Z"
}
}

IVR Events​

ivr.input_received​

Fired when DTMF input is received during an IVR menu.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:31:00Z",
"event": "ivr.input_received",
"data": {
"call_id": "call_xyz789",
"menu_id": "menu_main",
"input": "2",
"input_type": "dtmf",
"received_at": "2024-01-15T10:31:00Z"
}
}

ivr.menu_presented​

Fired when an IVR menu is presented to the caller.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:30:30Z",
"event": "ivr.menu_presented",
"data": {
"call_id": "call_xyz789",
"menu_id": "menu_main",
"menu_name": "Main Menu",
"options": ["1", "2", "3"],
"presented_at": "2024-01-15T10:30:30Z"
}
}

ivr.timeout​

Fired when IVR input times out without receiving input.

{
"id": "evt_1234567890abcdef",
"timestamp": "2024-01-15T10:31:30Z",
"event": "ivr.timeout",
"data": {
"call_id": "call_xyz789",
"menu_id": "menu_main",
"timeout_duration": 30,
"timed_out_at": "2024-01-15T10:31:30Z"
}
}

Event Field Reference​

Common Fields​

All events contain these base fields:

FieldTypeDescription
idstringUnique event identifier
timestampstringISO 8601 timestamp when event occurred
eventstringEvent type identifier
dataobjectEvent-specific payload

Call Fields​

Common fields found in call-related event data:

FieldTypeDescription
call_idstringUnique call identifier
call_typestringinbound or outbound
fromstringCaller phone number
tostringRecipient phone number
durationintegerCall duration in seconds
statusstringinitiated, ringing, answered, completed, failed, cancelled

Event Filtering​

Update your webhook to receive only specific events:

curl -X PATCH https://api.audian.com:8443/v2/webhooks/wh_1234567890abcdef \
-H "X-Auth-Token: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [
"call.completed",
"call.failed",
"recording.completed"
]
}'

Event Ordering​

Events are delivered in the order they occur, but due to network conditions, they may arrive out of order. Use the timestamp field to establish the correct sequence.

Event Deduplication​

The Audian API maintains an id field on each event for deduplication. If you receive the same event id multiple times, it's a retry - process it only once.

Next Steps​