Skip to main content

Webhook Integration

Webhooks let you send AlertifyPro alert and recovery events to any HTTP endpoint — build custom integrations, trigger automation, or forward to other services.

Setup

  1. Go to Settings → Integrations → Webhooks
  2. Click "Add Webhook"
  3. Enter your endpoint URL
  4. Select which events to subscribe to
  5. Save and click "Send test event"

Subscrib-able events

EventFired when
monitor.downA monitor fails and alert fires
monitor.degradedA monitor is degraded (slow)
monitor.recoveredA monitor returns to operational
incident.createdA new incident is opened
incident.updatedAn incident status update is posted
incident.resolvedAn incident is resolved
ssl.expiringAn SSL certificate is expiring soon
heartbeat.missedA heartbeat ping was not received in time

Event payload

All webhook payloads follow this structure:

{
"event": "monitor.down",
"timestamp": "2026-03-02T14:23:00Z",
"organization": {
"id": "org_abc123",
"name": "Acme Inc."
},
"monitor": {
"id": "mon_xyz789",
"name": "Production API",
"type": "http",
"url": "https://api.yourapp.com/health"
},
"alert": {
"id": "alt_def456",
"severity": "critical",
"reason": "HTTP 503 Service Unavailable",
"failing_regions": ["us-east-1", "eu-west-1"],
"response_time_ms": null,
"consecutive_failures": 2,
"started_at": "2026-03-02T14:23:00Z"
}
}

Recovery payload includes a downtime_seconds field:

{
"event": "monitor.recovered",
"alert": {
"id": "alt_def456",
"resolved_at": "2026-03-02T14:29:12Z",
"downtime_seconds": 372
}
}

Verifying signatures

Every webhook request includes an X-AlertifyPro-Signature header. Use it to verify the payload came from AlertifyPro:

import crypto from 'crypto';

function verifyWebhook(payload: string, signature: string, secret: string): boolean {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');

return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(`sha256=${expected}`)
);
}

// Express.js example
app.post('/webhook', express.raw({ type: 'application/json' }), (req, res) => {
const sig = req.headers['x-alertifypro-signature'] as string;

if (!verifyWebhook(req.body.toString(), sig, process.env.WK_WEBHOOK_SECRET!)) {
return res.status(401).send('Invalid signature');
}

const event = JSON.parse(req.body.toString());
console.log('Received event:', event.event);

res.status(200).send('ok');
});

Retry policy

If your endpoint returns a non-2xx response, AlertifyPro retries with exponential backoff:

AttemptDelay
1st retry30 seconds
2nd retry5 minutes
3rd retry30 minutes
4th retry2 hours
5th retry8 hours

After 5 failed retries, the webhook delivery is marked as failed and you'll receive an email notification.


Request headers

Content-Type: application/json
X-AlertifyPro-Event: monitor.down
X-AlertifyPro-Signature: sha256=abc123...
X-AlertifyPro-Delivery: del_uuid123
User-Agent: AlertifyPro/2.0