Broadcast REST API

Overview

Share911 accepts requests to broadcast alerts via our REST API.  

In order to use the API your user account will need 2 things:

  • Broadcast Alert permission
  • An API key

To receive your API key, please contact support@share911.com.

API

Endpoint

REST Endpoint: https://api.share911.com/v1/broadcasts/

NOTE: The slash "/" at the end of the URL is required!  Visiting this URL through a browser will not allow broadcasts to be sent. This URL is only for REST calls.

Authentication

Basic authentication. The username is always "api". The password is the API key provided by Share911 Support.

Payload

The REST request should include data in JSON format.  The fields are:


channelId

Channel ID of the target communication channel.  To find the Channel ID, log in to Share911 and select the appropriate channel.  Then open your user menu and tap Manage Channel, then Channel Info.

Share911 also supports Custom Channel IDs.  The custom code can be any alphanumeric string, typically customers would use the same code that their HR or SIS uses for the building.  Custom Channel IDs can be configured on the Manage Channel => Registration page.


type

The name of the alert to broadcast.  This should match one of the alert types in the "Currently Selected Alerts" list under the Manage Channel => Broadcasting => Select Alerts page.


msg

An optional message to include in the broadcast, in string format.


integrationId

An ID identifying the integration / partner / company which is sending the alert, in string format.  This is used to prevent re-triggering the corresponding system when 2-way integration is enabled.


to

Alert recipients.  Requests via API would usually be broadcast to all members on the channel, like so:

{"userGroups":"ALL_USERS"}

Contact support@share911.com to customize recipients.

 

Examples

GENERIC


curl --user 'api:<YOUR API KEY>' \
   https://api.share911.com/v1/broadcasts/ \
-H "Content-Type: application/json" \
-d '{
"channelId": "<CHANNEL ID>",
"type": "<ALERT TYPE>",
"msg": "<MESSAGE>",
"integrationId": "<INTEGRATION_ID>",
"to": {"userGroups":"ALL_USERS"}
}'

LOCKDOWN


curl --user 'api:91567870-ffa6-4665-8188-ca0a4b820a21' \
   https://api.share911.com/v1/broadcasts/ \
-H "Content-Type: application/json" \
-d '{
"channelId": "sharevilledemo/eastbranch",
"type": "LOCKDOWN",
"msg": "Location: Plunger 12",
"integrationId": "acme",
"to": {"userGroups":"ALL_USERS"}
}'

ALL CLEAR


curl --user 'api:91567870-ffa6-4665-8188-ca0a4b820a21' \
   https://api.share911.com/v1/broadcasts/ \
-H "Content-Type: application/json" \
-d '{
"channelId": "sharevilledemo/eastbranch",
"type": "ALL CLEAR",
"msg": "",
"integrationId": "acme",
"to": {"userGroups":"ALL_USERS"}
}'

NOTES

* Repeated alert requests are ignored.  So if there is already an active LOCKDOWN then requesting another LOCKDOWN will not re-trigger an activation.  Broadcasting a different alert, such as an EVACUATE or SHELTER IN PLACE, will trigger a new activation.

* Request an ALL CLEAR broadcast to clear a channel of past activity.  Activity can be reviewed in Share911 after the incident via the After Action Report.