Triggering an Alert
An alert is a message that is played out on devices within a specified group every 30 seconds until it is acknowledged.
An alert can be started through a simple POST
request to our server into our /alerts
endpoint.
The POST
command to send an alert should take the following form:
Headers and Subscriber ID Path
apikey
: you should contact Relay to get your API key, as it is not available via self-service. Your key should be included within the Authorization header. Don’t forget to include “RelayApiKey” before your actual key.id
: your subscriber ID, which can be found on the Relay Dash through Help → Server Details under Subscriber
Required Content
notification
: custom message to be spoken on the group of devices. The Relay server will automatically convert your written text into spoken audio (text-to-speech)groups
: a list containing the group names or URNs to send the alert to.
Example
The following example is a curl command that sends an alert request up to our server.
This curl command alerts the group “housekeeping” that there is “Cleanup needed in the lounge”. The alert will continue to sound on a user’s device every 30 seconds until it is acknowledged by the user tapping the talk button. Once the user taps the talk button, the alert will stop sounding on the device. If the user does not acknowledge the alert after 5 minutes, the alert will timeout and cease playing. See what this alert looks like on the device in the video below.
Last updated