Subscribe API

This API serves to access real-time call status and agent status for your account, allowing you to subscribe to updates. When a call status or agent status changes, the information is communicated to the CRM.

👍

Domain name

Ensure to include the domain name in the 'Base URL' field located on the right section of the screen.

For In-CcaaS: subscription.ozonetel.com

For US: subscription.ccaas.ozonetel.com

Parameters

To utilize this API, you are required to provide all the following parameters.

BODY PARAMS

Specify the call event and agent event URLs in the BODY PARAMS field, as illustrated in the example below.

{
"callEventsURL": "http://call_test.com",
"agentEventsURL": "http://agent_test.com"
}

HEADERS

ParameterDescription
api_key*Available in CloudAgent admin login
username*CloudAgent account name
Content-Type*Enter "application/json"

Possible Responses

Success responseSubscription added successfully for User: XXXXX
Failure responseUnauthorized

This API provides the following information based on the call type (Manual, Inbound, Progressive) and action (Calling, Answered, Disconnect).

EventDescriptionExample
eventTypeWhether it's a Call or Chat. Please note that the chat feature has not yet been implementedCall (OR) Agent
eventTimeTime of the API hit.2023-12-03 10:35:55
usernameCloudAgent account namedemo_user
actionState of the call whether it's in calling, Answered, or DisconnectCalling
call_typeType of the call (Manual / InBound / Progressive / Preview / Predictive)"Inbound" if it is an inbound call
ucidUnique caller ID90XXX70X57XX55X1
monitor_ucidmonitor ucid for the call90XXX70X57XX55X1
agent_idID of the agent, to whom the call connectedhari
skillName of the skill through which the call was routed.General
caller_idCaller ID81XXX41XX4
didDID through which the call connected91XX7XXX7XX1
agent_numberAgent phone number88XXX5XXX6
event_timeTime of the actual event (calling, Answered, or Disconnect) occurred.2023-12-03 10:35:55

Below is the sample event displayed for an Answered Manual call.

{
"eventType": "Call",
"eventTime": "YYYY-MM-DD HH:MM:SS",
"username": "XXXXX",
"data": {
"action": "Answered",
"call_type": "Manual",
"ucid": "XXXXXXXXXXXXXX",
"monitor_ucid": "XXXXXXXXXXXXXX",
"agent_id": "XXXXX",
"skill": "XXXX",
"caller_id": "XXXXXXX",
"did": "XXXXXXXXXXXX",
"agent_number": "XXXXXXXXX",
"event_time": "YYYY-MM-DD HH:MM:SS"
}
},

Below is the sample agent event displayed.

{
"eventType":"Agent",
"eventTime":"YYYY-MM-DD HH:MM:SS",
"username":"XXXX",
"data":{
"action":"calling",
"agentUniqeId":XXX,
"agentId":"XXXX",
"eventData":XXX,
"agentMode":"XXXXX",
"miscDetails":XXXX,
"eventTime":"2024-08-13 18:21:11"
}
},

Language
URL
Click Try It! to start a request and see the response here!