POST request to any HTTP endpoint. It is the most flexible channel — use it to integrate with PagerDuty, Opsgenie, Discord (via webhook), custom dashboards, or any service that accepts JSON webhooks.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
type | "webhook" | Yes | Channel type |
url | string | Yes | Target URL for the POST request |
headers | Record<string, string> | No | Custom headers added to every request |
url and individual header values support ${ENV_VAR} syntax:
Payload Format
Every notification is sent as a JSON object withContent-Type: application/json:
| Field | Type | Description |
|---|---|---|
id | string | Unique notification ID |
event | string | Source event name |
severity | string | info, warning, or critical |
title | string | Notification title |
body | string | Notification body text |
data | object | Full source event payload |
timestamp | string | ISO-8601 timestamp |
ruleId | string | ID of the rule that triggered this notification |
Attachments
When a notification rule hasincludeOutcomes: true, task outcomes are included in the same JSON payload under an attachments array. File content is base64-encoded for JSON transport.
| Field | Type | Description |
|---|---|---|
label | string | Human-readable label |
type | string | Attachment type (file, text, url) |
filename | string | Original filename (if file-based) |
mimeType | string | MIME type |
size | number | File size in bytes |
text | string | Text content (for text-type attachments) |
url | string | URL reference (for url-type attachments) |
contentBase64 | string | Base64-encoded binary content |
Connectivity Test
Thetest() check validates that the configured url is a parseable URL. It does not make a network call — to verify end-to-end delivery, use the Send Direct API.
Error Handling
If the target server responds with a non-2xx status code, the webhook adapter throws an error with the HTTP status and status text. The notification router will emit anotification:failed event with the error details.
Setup
- Get the endpoint URL from your target service (PagerDuty, Opsgenie, custom server, etc.)
- Set any required auth tokens as environment variables
-
Add to Polpo config:
- Verify delivery using the Send Direct API or by triggering a test event