Create Call Subscription

Create a subscription to receive events on any state change of active calls

POST/?object=event&action=create&model=call

Request URL

POST
https://uc.hopdial.com/ns-api/?object=event&action=create&model=call

Send 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

NameTypeDescription
model
requiredbody
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.

territory
requiredbody
string

Your territory ID

domain
requiredbody
string

Specify which domain you would like to receive events for. Use * to receive events for all domains.

user
requiredbody
string

Specify which user to receive events for. Use * to receive for all users

post_url
requiredbody
string

HTTP or HTTPS endpoint. This is where HopDial will POST the events

expires
requiredbody
string (date)

Specifies when the subscription will expire. (Set to datetime in the future. Uses UTC timezone).

Example request

text
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.