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

Webhooks are available on Pulse and Wave plans. Upgrade to get webhook access.

Setting Up Webhooks

1

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.

2

Add Webhook in upsonar

Go to your dashboard Settings → Notifications.

Click "Add Webhook" and enter your webhook URL.

3

Add Custom Headers (Optional)

If your endpoint requires authentication, add custom headers like:

  • Authorization: Bearer your-token
  • X-API-Key: your-api-key
4

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:

Webhook Payload
{
  "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"
}
FieldTypeDescription
event_typestringType of event (see below)
titlestringShort summary of the alert
messagestringDetailed description
timestampnumberUnix timestamp (seconds)
user_idstringYour upsonar user ID

Event Types

Event TypeDescription
monitor.downSite is down or unreachable
monitor.upSite recovered and is back online
ssl.expiringSSL certificate is about to expire
domain.expiringDomain registration is about to expire

Popular Integrations

Examples for common services.

Slack Integration

1

Create Slack App

Go to api.slack.com/apps and create a new app.

2

Enable Incoming Webhooks

In your app settings, go to Incoming Webhooks and turn it on.

3

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/...)

4

Add to upsonar

Paste the webhook URL in upsonar's notification settings.

Rich Messages

Slack will display basic text from our webhook. For rich formatting, use a middleware like Zapier or n8n to transform our payload into Slack's block format.

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

Make sure your webhook endpoint validates incoming requests. Consider:
  • 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

PlanWebhook Channels
Echo (Free)Not available
Pulse2 webhook channels
Wave10 webhook channels