patch https://examplebaseURL.com/v1/api/apps//call-event-sub
Response Format
Parameter | Type | Description |
---|---|---|
enabled | Boolean | The value must be true or false. It is "true" when the subscription is successful, while it is "false" when the subscription fails. |
url | String | The webhook URL. In access to this URL, you can receive the notification of a call when it starts or ends in CINNOX. |
updatedAt | String | The updated date and time of this subscription. The value must be in RFC3339 format, e.g. 2022-11-07T00:00:00.000Z. |
Notification of Call
You can receive a call notification by accessing the webhook URL after subscribing to the call event.
- When a call starts, you will receive the following notification details:
Notification Details | Type | Description |
---|---|---|
message.id | String | The ID of the call. |
message.status | String | It must be "CallStart" when a call starts. |
message.serviceId | String | The service ID in CINNOX. |
message.caller.eid | String | The staff's EID of the caller. |
message.caller.number | Number | The caller's phone number. |
message.callees.eid | String | The staff's EID of the callee. |
message.callees.number | Number | The callee's (aka called party/receiver) phone number. |
- When a call ends, you will receive the following notification details:
Notification Details | Type | Description |
---|---|---|
message.status | String | It must be "CallEnd" when a call ends. |
message.serviceId | String | The service ID in CINNOX. |
message.id | String | The ID of the call. |
Webhook URL requirement:
The webhook URL needs to be verified. After that, you will get a POST request with an Action and are required to set the response in JSON Response format as shown below:
Note that the JsonResponse result is JSON encoding of the Action Endpoint Response.
Action Endpoint Request {
+ Challenge string json:"challenge"
+ }Action Endpoint Response {
+ Challenge string json:"challenge"
+ }Json Response {
+ Code int json:"code"
+ Result json.RawMessage json:"result"
+ }