Webhooks
Integrate upsonar with Slack, Discord, PagerDuty, or build custom integrations using webhooks.
What are Webhooks?
Send alerts to any service that accepts HTTP requests.
Webhooks are HTTP callbacks that upsonar sends to your specified URL when an event occurs (like your site going down). This allows you to integrate monitoring alerts with virtually any service.
Real-time
Instant delivery when events occur. No polling required.
Flexible
Works with Slack, Discord, custom APIs, and more.
Custom Headers
Add authentication headers for secure endpoints.
Paid Feature
Setting Up Webhooks
Get Your Webhook URL
From the service you want to integrate (Slack, Discord, etc.), generate an incoming webhook URL.
For custom integrations, use any HTTPS endpoint that accepts POST requests.
Add Webhook in upsonar
Go to your dashboard → Settings → Notifications.
Click "Add Webhook" and enter your webhook URL.
Add Custom Headers (Optional)
If your endpoint requires authentication, add custom headers like:
Authorization: Bearer your-tokenX-API-Key: your-api-key
Test Your Webhook
Click "Send Test" to verify the connection works correctly.
Payload Format
The JSON structure sent to your webhook endpoint.
upsonar sends a POST request with Content-Type: application/json containing:
{
"event_type": "monitor.down",
"title": "Site Down: example.com",
"message": "Your website example.com is not responding. Status: Connection timeout. Region: Frankfurt, Germany.",
"timestamp": 1705329120,
"user_id": "user_abc123"
}| Field | Type | Description |
|---|---|---|
| event_type | string | Type of event (see below) |
| title | string | Short summary of the alert |
| message | string | Detailed description |
| timestamp | number | Unix timestamp (seconds) |
| user_id | string | Your upsonar user ID |
Event Types
| Event Type | Description |
|---|---|
monitor.down | Site is down or unreachable |
monitor.up | Site recovered and is back online |
ssl.expiring | SSL certificate is about to expire |
domain.expiring | Domain registration is about to expire |
Popular Integrations
Examples for common services.
Slack Integration
Create Slack App
Go to api.slack.com/apps and create a new app.
Enable Incoming Webhooks
In your app settings, go to Incoming Webhooks and turn it on.
Add Webhook to Workspace
Click "Add New Webhook to Workspace" and select a channel.
Copy the webhook URL (looks like https://hooks.slack.com/services/...)
Add to upsonar
Paste the webhook URL in upsonar's notification settings.
Rich Messages
Security
HTTPS Only
We only send webhooks to secure HTTPS endpoints. HTTP URLs are rejected.
SSRF Protection
Internal and private IP addresses are blocked to prevent security issues.
Verify Your Endpoint
- Using a secret header to authenticate requests
- Checking the User-Agent matches
Upsonar-Notifications/1.0 - Validating the payload structure before processing
Troubleshooting
Webhook not receiving requests?
- Verify the URL is correct and uses HTTPS
- Check that your endpoint is publicly accessible
- Use the "Send Test" button to debug
- Check your server logs for incoming requests
Getting error responses?
- Ensure your endpoint returns 2xx status codes
- Check that custom headers are correctly formatted
- Verify your endpoint can handle JSON POST requests
Timeout errors?
- Webhook requests timeout after 10 seconds
- Process requests asynchronously if needed
- Return 200 immediately, then process in background
Limits
| Plan | Webhook Channels |
|---|---|
| Echo (Free) | Not available |
| Pulse | 2 webhook channels |
| Wave | 10 webhook channels |