Create Presence Subscription
Create a subscription to receive events on any update to users presence.
/?object=event&action=create&model=presenceRequest URL
https://uc.hopdial.com/ns-api/?object=event&action=create&model=presenceSend 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 "presence". This will update on presence and status message updates. |
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 |
expiresoptionalbody | string (date) | Specifies when the subscription will expire. (Set date a couple days in the future as server time calculates the expiration incorrectly) |
Example request
curl --location --request POST 'https://uc.hopdial.com/ns-api/?object=event&action=create' \
--header 'Authorization: Bearer 06ceda673236fc567acf6f1322fc8870' \
--form 'model=presence' \
--form 'post_url=https://www.acmecorp.com/callback/presencelistener' \
--form 'expires=2040-05-08+00:00' \
--form 'domain=acmecorp.12345.service'Responses
<?xml version="1.0" encoding="UTF-8"?>
<xml>
<Subscription>
<model>presence</model>
<scope>Office Manager</scope>
<territory>12345</territory>
<domain>acmecorp.12345.service</domain>
<user>*</user>
<post_url>https://www.acmecorp.com/callback/presencelistener</post_url>
<owner_uid>[email protected]</owner_uid>
<expires>2040-05-08 00:00:00</expires>
<subscription_id>859ac5cb78df917849f7b2d9f17fff40</subscription_id>
</Subscription>
</xml{}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.