Webhook Notifications
Configure real-time webhook notifications for scan results and security findings.
Overview
Webhooks let Surfbot push events to your systems in real-time. Instead of polling the API, you receive an HTTP POST whenever something important happens.
Setting Up Webhooks
- Go to Settings → Webhooks in your dashboard
- Click Add Webhook
- Enter your endpoint URL (must be HTTPS)
- Select which events to subscribe to
- Copy the signing secret for verification
Events
| Event | Description |
|---|---|
scan.started | A scan has begun |
scan.completed | A scan finished successfully |
scan.failed | A scan encountered an error |
finding.new | A new vulnerability or asset was discovered |
finding.remediated | A previously found vulnerability is no longer detected |
certificate.expiring | A TLS certificate expires within 14 days |
domain.verified | Domain verification succeeded |
Payload Format
All webhook payloads follow a consistent structure:
Verifying Webhooks
Every webhook request includes a signature header for verification:
Verify it using your signing secret:
Always verify webhook signatures. Without verification, an attacker could send fake events to your endpoint.
Retry Policy
If your endpoint returns a non-2xx status code, Surfbot retries with exponential backoff:
| Attempt | Delay |
|---|---|
| 1st retry | 30 seconds |
| 2nd retry | 2 minutes |
| 3rd retry | 10 minutes |
| 4th retry | 1 hour |
| 5th retry | 6 hours |
After 5 failed attempts, the webhook is marked as failing and you'll receive an email notification.
Example: Slack Integration
Send new critical findings to a Slack channel:
Testing Webhooks
Use the Test button in your webhook settings to send a sample payload. You can also use tools like webhook.site during development to inspect payloads before building your handler.