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://share911.com/api/v1/broadcast"

NOTE: 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.  The easiest way to find the Channel ID is on the Manage Channel => Channel Info page, under either Channel ID or Share ID.  You can also find the Channel ID by looking in the URL. For example, if I select the East Branch channel in Share911, the Channel ID is the "sharevilledemo/eastbranch" part of the URL:
https://share911.com/sharevilledemo/eastbranch

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.

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 -X POST --user 'api:<YOUR API KEY>' \
https://share911.com/api/v1/broadcast \
-H "Content-Type: application/json" \
-d '{
"channelId": "<CHANNEL ID>",
"type": "<ALERT TYPE>",
"msg": "<MESSAGE>",
"to": {"userGroups":"ALL_USERS"}
}'

LOCKDOWN


curl -X POST --user 'api:91567870-ffa6-4665-8188-ca0a4b820a21' \
https://share911.com/api/v1/broadcast \
-H "Content-Type: application/json" \
-d '{
"channelId": "sharevilledemo/eastbranch",
"type": "LOCKDOWN",
"msg": "Martians Attacking!",
"to": {"userGroups":"ALL_USERS"}
}'

ALL CLEAR


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

NOTES

* Repeated alert requests are ignored.  So if there is already an active LOCKDOWN then requesting another LOCKDOWN will not work.  But you can broadcast a different alert, such as an EVACUATE or SHELTER IN PLACE.

* Request an ALL CLEAR broadcast to clear a channel of past activity.  Activity can be reviewed via the After Action report.