Generic Webhook โ
Send JSON payloads to any HTTP endpoint. This adapter is designed for custom integrations with services like Ntfy, Gotify, PagerDuty, Uptime Kuma, and any other service that accepts HTTP requests.
Overview โ
- ๐ Universal โ Works with any HTTP endpoint that accepts JSON
- ๐ Custom Templates โ Define your own payload structure with
placeholders - ๐ Authentication โ Support for Authorization headers (Bearer tokens, API keys)
- โ๏ธ Flexible โ Configurable HTTP method, Content-Type, and custom headers
Configuration โ
| Field | Description | Default | Required |
|---|---|---|---|
| Webhook URL | Target HTTP endpoint URL | โ | โ |
| HTTP Method | POST, PUT, or PATCH | POST | โ |
| Content-Type | Content-Type header value | application/json | โ |
| Authorization | Authorization header value | โ | โ |
| Custom Headers | Additional headers (one per line, Key: Value) | โ | โ |
| Payload Template | Custom JSON template with placeholders | โ | โ |
Setup Guide โ
1. Identify Your Endpoint โ
Determine the HTTP endpoint and authentication method of your target service. Common examples:
| Service | Endpoint | Auth |
|---|---|---|
| Ntfy | https://ntfy.sh/your-topic | None or Bearer token |
| Gotify | https://gotify.example.com/message | App token in URL or header |
| PagerDuty | https://events.pagerduty.com/v2/enqueue | Routing key in payload |
| Uptime Kuma | https://uptime.example.com/api/push/... | Token in URL |
| Custom API | Your endpoint | As needed |
2. Configure in DBackup โ
- Go to Notifications in the sidebar
- Click Add Notification
- Select Generic Webhook
- Enter the webhook URL
- (Optional) Configure method, headers, and authentication
- (Optional) Create a custom payload template
- Click Test to verify
- Save
Default Payload โ
When no custom template is set, DBackup sends the following JSON payload:
{
"title": "Backup Successful",
"message": "Job 'Production MySQL' completed successfully",
"success": true,
"color": "#00ff00",
"timestamp": "2026-02-20T14:30:00.000Z",
"eventType": "backup_success",
"fields": [
{ "name": "Job", "value": "Production MySQL", "inline": true },
{ "name": "Duration", "value": "2m 30s", "inline": true },
{ "name": "Size", "value": "45.2 MB", "inline": true }
]
}Custom Payload Templates โ
Use placeholders to create your own payload structure. Available variables:
| Variable | Description | Example |
|---|---|---|
| Event title | Backup Successful |
| Summary message | Job 'Production' completed |
| Boolean (as string) | true or false |
| Status hex color | #00ff00 |
| ISO 8601 timestamp | 2026-02-20T14:30:00.000Z |
| Event type identifier | backup_success |
| JSON array of fields | [{"name":"Job","value":"Prod"}] |
Template Examples โ
Ntfy
{
"topic": "dbackup",
"title": "{{title}}",
"message": "{{message}}",
"priority": 3
}Gotify
{
"title": "{{title}}",
"message": "{{message}}",
"priority": 5
}Set Authorization to Bearer YOUR_APP_TOKEN.
PagerDuty
{
"routing_key": "YOUR_ROUTING_KEY",
"event_action": "trigger",
"payload": {
"summary": "{{title}}: {{message}}",
"severity": "critical",
"source": "dbackup"
}
}Uptime Kuma (Push)
No template needed โ just use the push URL as the webhook URL:
https://uptime.example.com/api/push/YOUR_PUSH_TOKEN?status=up&msg={{message}}Simple Text Payload
{
"text": "[{{title}}] {{message}}"
}Authentication โ
Bearer Token โ
Set the Authorization field to:
Bearer your-api-token-hereAPI Key Header โ
Use Custom Headers for non-standard authentication:
X-API-Key: your-api-key-hereBasic Auth โ
Set the Authorization field to:
Basic base64-encoded-credentialsGenerate with: echo -n "user:password" | base64
Custom Headers โ
Add one header per line in Key: Value format:
X-Custom-Header: my-value
X-Source: dbackup
Accept: application/jsonTroubleshooting โ
Connection Refused โ
Webhook returned 0: Connection refusedSolutions:
- Verify the URL is correct and the service is running
- Check firewall rules allow outbound connections from DBackup
- If self-hosted, ensure the service is accessible from DBackup's network
Authentication Failed โ
Webhook returned 401: UnauthorizedSolutions:
- Verify the Authorization header value
- Check if the API key or token has expired
- Ensure the token has the required permissions
Invalid Payload โ
Webhook returned 400: Bad RequestSolutions:
- Verify your custom template is valid JSON
- Check the target service's expected payload format
- Ensure Content-Type matches what the service expects
Template Variables Not Replaced โ
If you see literal in the payload:
- Check for typos in variable names
- Only the documented variables are supported
- Variable names are case-sensitive
Best Practices โ
- Start without a template โ Test with the default payload first, then customize
- Use HTTPS โ Always prefer encrypted connections
- Rotate tokens regularly โ Update API keys for the receiving service periodically
- Test after changes โ Always use the Test button after modifying configuration
- Keep templates simple โ Complex templates are harder to debug
- Document your integrations โ Note which services receive notifications and why