Webhooks
A webhook is an HTTPS address on the public internet that RingHuddle POSTs events to: call.completed when a call to a ring group ends, and minutes.low when a group has fewer than 20 minutes left with auto-reload off (with the email, at most once a day).
Adding one
Add a webhook on your account page, with POST /api/v1/webhooks, or with rh webhooks add. An account has at most 5, and a key limited to ring groups can't manage them. The reply shows its signing secret once.
POST /api/v1/webhooks/{id}/test sends a ping, and the list shows how the last delivery went.
Checking a delivery
Each delivery is JSON: id (the same on every retry, to skip duplicates), type, created_at and data. Its RingHuddle-Signature header is t=<unix seconds>,v1=<hex>, where the hex is the HMAC-SHA256 of <t>.<body> with the secret. Check it against the raw bytes you received, before parsing them, with a constant-time comparison, and refuse an old t.
An example to test your own check against. With this secret and body, sent at t=1767225600:
secret: whsec_example_do_not_use
body: {"id":"evt_example","type":"ping","created_at":"2026-01-01T00:00:00Z","data":{}}
the header is:
RingHuddle-Signature: t=1767225600,v1=b559dcb7923224c64bd7b36362f0d81c6b83822247291cc8ae83b07faba10327
Python
import hashlib
import hmac
import time
MAX_AGE_SECONDS = 300
def is_genuine(secrets, header, body, now=None):
"""True if `body` (the raw request bytes) was signed with one of `secrets`.
`header` is the RingHuddle-Signature header: t=<unix seconds>,v1=<hex>,
with a second v1= for a day after the secret is changed.
"""
timestamp, signatures = None, []
for part in header.split(","):
name, _, value = part.strip().partition("=")
if name == "t":
timestamp = value
elif name == "v1":
signatures.append(value)
if timestamp is None or not timestamp.isdigit():
return False
now = time.time() if now is None else now
if abs(now - int(timestamp)) > MAX_AGE_SECONDS:
return False
signed = timestamp.encode() + b"." + body
for secret in secrets:
expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest()
if any(hmac.compare_digest(expected, given) for given in signatures):
return True
return False
JavaScript
import { createHmac, timingSafeEqual } from "node:crypto";
const MAX_AGE_SECONDS = 300;
// True if `body` (the raw request bytes, a Buffer) was signed with one of
// `secrets`. `header` is the RingHuddle-Signature header:
// t=<unix seconds>,v1=<hex>, with a second v1= for a day after the secret
// is changed.
export function isGenuine(secrets, header, body, now = Date.now() / 1000) {
let timestamp = null;
const signatures = [];
for (const part of header.split(",")) {
const [name, value] = part.trim().split("=", 2);
if (name === "t") timestamp = value;
else if (name === "v1") signatures.push(value);
}
if (timestamp === null || !/^\d+$/.test(timestamp)) return false;
if (Math.abs(now - Number(timestamp)) > MAX_AGE_SECONDS) return false;
const signed = Buffer.concat([Buffer.from(`${timestamp}.`), body]);
for (const secret of secrets) {
const expected = createHmac("sha256", secret).update(signed).digest();
for (const given of signatures) {
const candidate = Buffer.from(given, "hex");
if (candidate.length === expected.length && timingSafeEqual(candidate, expected)) {
return true;
}
}
}
return false;
}
Both take a list of secrets, so the same code works while a secret is being changed (below).
Answering, and retries
Answer 2xx within 10 seconds; anything else, a redirect included, is tried again after 1, 2, 4… minutes, 8 times in all. A retry carries the same id, so keep the ids you have handled and skip one you have seen.
Changing the secret
Use New secret on the account page, POST /api/v1/webhooks/{id}/rotate-secret (with an Idempotency-Key), or rh webhooks rotate. The new secret is shown once. For 24 hours the old one signs too: the header then has two v1= entries, new first, and a delivery is genuine if either matches a secret you hold. Switch your receiver to the new secret within the day; the webhook's previous_secret_expires_at says when the old one stops.