API and webhooks

Read your church's status from your own screens and tools, and be told the moment something changes. The account owner makes keys and webhooks under Settings.

Reading

Send your key as a bearer token. Every endpoint is a GET that answers JSON, for your church only. Up to 120 requests a minute per key; past that you get 429 and a Retry-After.

curl -H "Authorization: Bearer sw_..." https://app.multisite-cloud.streamworks.video/api/v1/status
  • GET /api/v1/churchYour church, its plan, and its campuses and rooms.
  • GET /api/v1/statusWhat Home says: one sentence, open alerts, and every campus and device with its state.
  • GET /api/v1/alertsWhat needs someone now, each with the help page for it.
  • GET /api/v1/scheduleYour service times, the services they make over the next two weeks, and your Planning Center plans if connected.
  • GET /api/v1/servicesRecent recorded services, newest first, with where to watch each on the web.

A missing or revoked key gets 401.

Webhooks

We POST a JSON event to each of your https addresses. Answer with any 2xx within 10 seconds. Anything else, and we try again after 1 minute, 5, 30, 2 hours and 12 hours, then give up on that event.

{
  "id": "evt_...",
  "type": "alert.opened",
  "created_at": "2026-10-04T08:15:00.000Z",
  "data": { "alert_id": "...", "headline": "down", "detail": "...", "help_url": "..." }
}
  • alert.openedSomething needs someone: alert_id, subject, state, headline, detail, opened_at, help_url.
  • alert.resolvedIt recovered. The same fields.
  • test_run.passedA test run reached every campus: test_run_id, campuses with their state.
  • pingThe Test button on Settings.

Checking a webhook is from us

Deliveries are signed the Standard Webhooks way, so its libraries verify them. By hand: the signature is HMAC-SHA256 of id.timestamp.body, keyed with your signing secret after whsec_, base64-decoded. Refuse a timestamp more than five minutes old. The same event id can arrive twice: use it to skip repeats.

import { createHmac, timingSafeEqual } from "node:crypto";

function fromStreamWorks(secret, headers, body) {
  const id = headers["webhook-id"], ts = headers["webhook-timestamp"];
  if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false;
  const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64");
  const want = "v1," + createHmac("sha256", key).update(`${id}.${ts}.${body}`).digest("base64");
  return headers["webhook-signature"].split(" ").some(
    (sig) => sig.length === want.length && timingSafeEqual(Buffer.from(sig), Buffer.from(want)));
}