Webhooks
Webhooks
Section titled “Webhooks”Receive real-time notifications about monitor events.
Setting Up Webhooks
Section titled “Setting Up Webhooks”- Go to Settings → Webhooks
- Click Add Webhook
- Enter your endpoint URL
- Select events to receive
- Save the webhook
Webhook Events
Section titled “Webhook Events”monitor.down
Section titled “monitor.down”Triggered when a monitor fails.
{ "event": "monitor.down", "monitor": { "id": "mon_abc123", "name": "Production API", "url": "https://api.example.com" }, "incident": { "started_at": "2024-01-15T10:30:00Z", "error": "Connection timeout" }}monitor.up
Section titled “monitor.up”Triggered when a monitor recovers.
{ "event": "monitor.up", "monitor": { "id": "mon_abc123", "name": "Production API", "url": "https://api.example.com" }, "incident": { "started_at": "2024-01-15T10:30:00Z", "resolved_at": "2024-01-15T10:35:00Z", "duration_seconds": 300 }}Webhook Security
Section titled “Webhook Security”Signature Verification
Section titled “Signature Verification”All webhooks include a signature header for verification:
X-Uptimenine-Signature: sha256=...Verify using your webhook secret:
const crypto = require('crypto');
function verifySignature(payload, signature, secret) { const expected = crypto .createHmac('sha256', secret) .update(payload) .digest('hex'); return `sha256=${expected}` === signature;}Retry Policy
Section titled “Retry Policy”Failed webhook deliveries are retried:
- 1st retry: 1 minute
- 2nd retry: 5 minutes
- 3rd retry: 30 minutes
- Final retry: 2 hours
After 4 failed attempts, the webhook is marked as failing.