Signed webhooks
Copies this page as Markdown with context, so an AI can walk you through your case step by step.
Receive every alert as a JSON POST on your own API and verify that it comes from ganyant.
Format
POST /hooks/ganyant HTTP/1.1
Content-Type: application/json
X-Ganyant-Signature: 4f1c…e9a2
{
"event": "incident.opened",
"title": "🔴 Caído: API de pagos",
"data": { "monitor": "API de pagos", "target": "https://api.example.com/health", "monitor_id": "…" },
"sent_at": 1794761152
}The title field is human-readable text in the workspace language; use event and data for automation.
Events
incident.opened | A monitor went down (confirmed) |
incident.resolved | The monitor recovered |
incident.escalated | Nobody acknowledged and the on-call rotation escalated |
ssl.expiring | Certificate about to expire |
security.new_findings | New audit findings |
disk.high | Disk over the threshold |
intrusion | Brute force or another intrusion signal |
backup.failed | A backup failed |
test | Test sent from the dashboard |
Verify the signature
The X-Ganyant-Signature header is the hex HMAC-SHA256 of the exact body received, using that channel’s own secret. You will find it in Dashboard → Alerts and on-call, under “Signing secret” below the webhook. Each channel has a different secret.
Node.js
import crypto from 'node:crypto';
export function verify(rawBody, signature, secret) {
const expected = crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
return crypto.timingSafeEqual(Buffer.from(expected, 'hex'), Buffer.from(signature, 'hex'));
}Python
import hmac, hashlib
def verify(raw_body: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, signature)Also reject events whose sent_at is more than 5 minutes old, to prevent replays.
Responses and retries
Respond with a 2xx code within 15 seconds. Any other response is retried with exponential backoff up to 6 times.