Create Call Subscription
Create a subscription to receive events on any state change of active calls
/?object=event&action=create&model=callRequest URL
https://uc.hopdial.com/ns-api/?object=event&action=create&model=callSend your access token in the Authorization: Bearer header. Body parameters are sent as application/x-www-form-urlencoded. New to the API? Start with authentication and rate limits.
Parameters
| Name | Type | Description |
|---|---|---|
modelrequiredbody | string | Must be "call". This will send active call updates. Expect a unique data set per term callid and term device. A json field "remove" set to "yes" will be added when the call is completed. |
territoryrequiredbody | string | Your territory ID |
domainrequiredbody | string | Specify which domain you would like to receive events for. Use * to receive events for all domains. |
userrequiredbody | string | Specify which user to receive events for. Use * to receive for all users |
post_urlrequiredbody | string | HTTP or HTTPS endpoint. This is where HopDial will POST the events |
expiresrequiredbody | string (date) | Specifies when the subscription will expire. (Set to datetime in the future. Uses UTC timezone). |
Example request
curl https://uc.hopdial.com/ns-api/ \
-H 'Authorization: Bearer 7bet078rqljh451l31uh34lsd0f80dsf' \
-d object='event' \
-d action='create' \
-d model='call' \
-d territory='11111' \
-d domain='abc-company.11111.service' \
-d user='*' \
-d post_url='https://events.example.com/calls'
-d expires='2016-11-20 00:00:00'Responses
200 · application/json
More Subscriptions endpoints
Webhooks: get call, CDR, recording, presence, agent, and audit events POSTed to your own URL.
Need a Client ID and Client Secret or help with this endpoint? Contact HopDial support or call (866) 305-0407.