Radio Mast can send a webhook to your website when your radio stream goes down, so you can build your own custom integrations.
This page explains the technical details of the webhook requests so you know what to expect and can build your integration accordingly. For information about alerting in general, see Alerting.
To add a webhook, visit your Alerting page, and click "Add Contact". After adding a webhook, remember to add it to an Alert Policy so that it gets triggered.
Radio Mast will send an HTTP POST request a stream goes down or comes back online. The POST request will contain a JSON-encoded body with the following fields:
down if the stream is down, and up if the stream is up.Note about the optional stream field: If an alert policy is set to only send notifications when all streams are down, then the stream field in a webhook will be set
to null.
An example JSON body from an alert webhook POST is as follows:
{
"timestamp": 1579728021,
"summary": "Example FM Alert: Stream 1 is down",
"event": {
"type": "down",
"stream": {
"id": "6ffd5f90-64dd-421d-b48a-349eee8ca535",
"name": "Stream 1",
"listening_url": "http://yourstreamexample.com/mount",
"silence": true
},
"station": {
"id": "fd75e020-9569-4e9a-af3f-a8e1ea9c87d3",
"name": "Example FM"
}
}
}
Your web application should respond with an HTTP 200 OK response.