Webhook Monitors
Webhook monitors receive error reports from your applications. When the error rate exceeds a threshold, an alert is triggered.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /webhook_monitors | List all webhook monitors |
| GET | /webhook_monitors/:id | Get a specific monitor |
| POST | /webhook_monitors | Create a monitor |
| PUT | /webhook_monitors/:id | Update a monitor |
| DELETE | /webhook_monitors/:id | Delete a monitor |
Webhook Monitor Object
{
"id": "xyz789",
"title": "API Errors",
"webhook_id": "550e8400-e29b-41d4-a716-446655440000",
"webhook_url": "https://beepr.io/api/webhook/550e8400-e29b-41d4-a716-446655440000",
"error_rate_threshold": 5,
"error_rate_window_minutes": 10,
"alert_group_id": "abc123",
"status": "quiet",
"last_received_at": "2024-01-15T10:35:00Z",
"external_id": "api-errors",
"inserted_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
Fields
| Field | Type | Description |
|---|---|---|
title | string | Name of the monitor (required) |
alert_group_id | string | Alert group to notify (required) |
error_rate_threshold | integer | Errors before alerting (default: 1) |
error_rate_window_minutes | integer | Time window in minutes (default: 5) |
webhook_id | string | UUID for the webhook URL (generated) |
webhook_url | string | Full URL to send errors to (generated) |
status | string | Current status: quiet, firing, or resolved |
external_id | string | Your identifier for idempotent operations |
Create a Webhook Monitor
curl -X POST https://beepr.io/api/v1/webhook_monitors \
-H "Authorization: Bearer bpr_your_key" \
-H "Content-Type: application/json" \
-d '{
"alert_group_id": "abc123",
"title": "API Errors",
"error_rate_threshold": 5,
"error_rate_window_minutes": 10,
"external_id": "api-errors"
}'
Sending Errors
POST error details to the webhook_url:
curl -X POST https://beepr.io/api/webhook/550e8400... \
-H "Content-Type: application/json" \
-d '{
"message": "Connection refused",
"source": "payment-service"
}'
Integration Example
Configure your application's error handler to report to Beepr:
import requests
def report_error(error):
requests.post(
"https://beepr.io/api/webhook/550e8400...",
json={"message": str(error), "source": "my-app"}
)
For the complete schema, see the OpenAPI specification.