Webhook alerts
Snapshot Archive offers two webhook systems: per-monitor alert webhooks (notify when a specific monitor detects visual changes) and account-level webhook events (notify on any activity — see Webhook Events). This guide covers per-monitor alert webhooks.
Configure per-monitor alerts
Set the alert_webhook_url field on a monitor to receive HTTP POST notifications when changes are detected above the threshold.
bash
curl -X PATCH "https://api.snapshotarchive.com/v1/monitors/42" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" -H "Accept: application/json" \
-d '{
"alert_enabled": true,
"alert_webhook_url": "https://your-server.com/webhooks/screenshot-change",
"diff_enabled": true,
"diff_threshold_percent": 5
}'$response = Http::withToken('YOUR_API_KEY')
->patch('https://api.snapshotarchive.com/v1/monitors/42', [
'alert_enabled' => true,
'alert_webhook_url' => 'https://your-server.com/webhooks/screenshot-change',
'diff_enabled' => true,
'diff_threshold_percent' => 5,
]);
$monitor = $response->json('data');import requests
resp = requests.patch('https://api.snapshotarchive.com/v1/monitors/42',
headers={'Authorization': 'Bearer YOUR_API_KEY', 'Accept': 'application/json'},
json={'alert_enabled': True,
'alert_webhook_url': 'https://your-server.com/webhooks/screenshot-change',
'diff_enabled': True, 'diff_threshold_percent': 5})
monitor = resp.json()['data']const resp = await fetch('https://api.snapshotarchive.com/v1/monitors/42', {
method: 'PATCH',
headers: { 'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json', 'Accept': 'application/json' },
body: JSON.stringify({ alert_enabled: true,
alert_webhook_url: 'https://your-server.com/webhooks/screenshot-change',
diff_enabled: true, diff_threshold_percent: 5 }),
});
const { data: monitor } = await resp.json();require 'net/http'
require 'json'
uri = URI('https://api.snapshotarchive.com/v1/monitors/42')
req = Net::HTTP::Patch.new(uri, 'Authorization' => "Bearer #{API_KEY}",
'Content-Type' => 'application/json', 'Accept' => 'application/json')
req.body = { alert_enabled: true,
alert_webhook_url: 'https://your-server.com/webhooks/screenshot-change',
diff_enabled: true, diff_threshold_percent: 5 }.to_json
resp = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
monitor = JSON.parse(resp.body)['data']body := strings.NewReader(`{"alert_enabled":true,
"alert_webhook_url":"https://your-server.com/webhooks/screenshot-change",
"diff_enabled":true,"diff_threshold_percent":5}`)
req, _ := http.NewRequest("PATCH", "https://api.snapshotarchive.com/v1/monitors/42", body)
req.Header.Set("Authorization", "Bearer "+apiKey)
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)Alert channels
| Field | Description |
|---|---|
alert_email | Email address for notifications |
alert_webhook_url | Custom HTTP endpoint (POST) |
alert_slack_webhook_url | Slack incoming webhook URL |
alert_discord_webhook_url | Discord webhook URL |
alert_telegram_bot_token | Telegram bot token (with alert_telegram_chat_id) |
Diff threshold. Set
diff_threshold_percent to control sensitivity. A value of 5 means only changes affecting 5% or more of the page trigger an alert.