Skip to main content

Webhook Monitors

Webhook monitors receive error reports from your applications. When the error rate exceeds a threshold, an alert is triggered.

Endpoints

MethodPathDescription
GET/webhook_monitorsList all webhook monitors
GET/webhook_monitors/:idGet a specific monitor
POST/webhook_monitorsCreate a monitor
PUT/webhook_monitors/:idUpdate a monitor
DELETE/webhook_monitors/:idDelete 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

FieldTypeDescription
titlestringName of the monitor (required)
alert_group_idstringAlert group to notify (required)
error_rate_thresholdintegerErrors before alerting (default: 1)
error_rate_window_minutesintegerTime window in minutes (default: 5)
webhook_idstringUUID for the webhook URL (generated)
webhook_urlstringFull URL to send errors to (generated)
statusstringCurrent status: quiet, firing, or resolved
external_idstringYour 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.