Skip to main content

Webhooks

By using webhooks, you can tightly integrate your server application with Wildix. The platform supports two kinds of webhooks: HTTP and AWS SQS.

HTTP webhooks follow the common set of rules:

  • Webhook should be reachable from the public internet. Tunneling services like Ngrok are supported
  • Webhook should accept HTTP POST requests with JSON payload
  • Webhook should respond with response codes from 200 to 299
  • Webhook should respond as fast as possible. The exact time given for the response varies between webhook types
  • Webhook should be ready to accept the same call multiple times: in case of network or remote server failure Wildix Service could retry the request

Events

call:completed

Triggered when a call ends and all related information is stored.

Example
{
"id": "it_w000001_1721833634.195",
"pbx": "000000000001",
"company": "it_w000001",
"time": 1721836787753,
"type": "call:completed",
"integrationId": "s95eum",
"data": {
"id": "it_w000001_1721833634.195",
"pbx": "000000000001",
"time": 1721836787590,
"company": "it_w000001",
"licenses": [
"x-bees"
],
"type": "call",
"flows": [
{
"flowIndex": 0,
"startTime": 1721836405153,
"endTime": 1721836427828,
"duration": 22675,
"connectTime": 5084,
"talkTime": 9033,
"waitTime": 8558,
"caller": {
"type": "LOCAL",
"phone": "230",
"name": "John Doe",
"email": "johndoe@example.com",
"userId": "3216286",
"userExtension": "230",
"userDepartment": "Sales",
"groupId": "1238467",
"groupName": "Gamma",
"userAgent": "x-bees Web 1.76.0.999999 76c54617-c30a-4410-acd0-8d4657344284",
"userDevice": "XBEES_WEB",
"role": "AGENT",
"license": "premium"
},
"callee": {
"type": "REMOTE",
"phone": "+15955555123",
"name": "+15955555123",
"role": "CLIENT"
},
"serviceNumber": "230",
"destination": "+15955555123",
"direction": "OUTBOUND",
"trunkName": "SIPTRUNK",
"trunkDirection": "outgoing",
"tags": [
"External"
],
"remotePhone": "+15955555123",
"callStatus": "COMPLETED"
}
],
"endCause": "16",
"endCauseStr": "Normal Clearing",
"endBy": "CALLER",
"totalConnectTime": 5084,
"totalTalkTime": 368660,
"totalWaitTime": 8559,
"complete": true
}
}

conference:completed

Triggered when a conference ends and all related information is stored.

Example
{
"id": "cod2pdwq-drl8-zaau-58pe-7uvsyqe2-11_1721833794446",
"pbx": "000000000001",
"company": "it_w000001",
"time": 1721833842061,
"type": "conference:completed",
"integrationId": "s95eum",
"data": {
"id": "cod2pdwq-drl8-zaau-58pe-7uvsyqe2-11_1721833794446",
"time": 1721833842002,
"company": "it_w000001",
"type": "conference",
"pbx": "000000000001",
"startTime": 1721833794452,
"endTime": 1721833841838,
"duration": 47386,
"subject": "Sales Room",
"direction": "INTERNAL",
"status": "COMPLETED",
"participants": [
{
"jid": "jid1@conference-xmpp.wildix.com/f3114d96",
"info": {
"type": "XBS",
"jid": "jid1@conference-xmpp.wildix.com/f3114d96",
"name": "John Doe",
"email": "johndoe@example.com",
"department": "Sales",
"company": "it_w000001",
"pbxSerial": "000000000001",
"pbxExtension": "230",
"pbxGroupId": "1234567",
"xbsId": "jDo1hnOE337x",
"license": "premium",
"role": "AGENT"
},
"totalDuration": 42146,
"totalSpeakDuration": 0,
"joinTime": 1721833799635
},
{
"jid": "jid2@conference-xmpp.wildix.com/11d6c052",
"info": {
"type": "XBS",
"jid": "jid2@conference-xmpp.wildix.com/11d6c052",
"name": "Jane Doe",
"email": "jonedoe@example.com",
"department": "Marketing",
"company": "it_w000001",
"pbxSerial": "000000000001",
"pbxExtension": "320",
"pbxGroupId": "1234567",
"xbsId": "JaNe58pE7uvs",
"license": "premium",
"role": "AGENT"
},
"totalDuration": 25708,
"totalSpeakDuration": 5816,
"joinTime": 1721833794452
}
],
"waitTime": 5000,
"transcriptions": "2024-07-24/conference_it_w000001_cod2pdwq-drl8-zaau-58pe-7uvsyqe2-1111833794444.json",
"transcriptionStatus": "AVAILABLE",
"transcriptionLanguage": "en-US"
}
}

chat:completed

Triggered when a chat session ends and all related information is stored.

Example
{
"id": "group:12366d26-7d72-4beb-8646-50a46893",
"company": "it_w000001",
"time": 1721835773670,
"type": "chat:completed",
"integrationId": "s95eum",
"data": {
"id": "group:12366d26-7d72-4beb-8646-50a46893",
"time": 1721833973372,
"company": "it_w000001",
"type": "chat",
"duration": 0,
"subject": "Support Channel",
"direction": "OUTBOUND",
"tags": [],
"status": "MISSED",
"participants": [
{
"id": "jDo1hnOE337x",
"info": {
"id": "jDo1hnOE337x",
"name": "John Doe",
"email": "johndoe@example.com",
"picture": "https://pbx.wildixin.com/cticonnect/cticonnect_share/avatar_6660666.png",
"company": "it_w000001",
"pbxDomain": "pbx.wildixin.com",
"pbxPort": "443",
"pbxExtension": "230",
"pbxSerial": "000000000001",
"pbxUserId": "6660666",
"createdAt": "2024-03-29T15:30:46.845821Z",
"updatedAt": "2024-07-24T14:38:05.78351Z",
"type": "LOCAL",
"role": "AGENT"
}
}
]
}
}