Generic webhook
The Generic service can be used for any target that is not explicitly supported by Shoutrrr, as long as it supports receiving the message via a POST request.
Sometimes this requires customization on the receiving end to interpret the payload, or use of an intermediate proxy to modify the payload.
URL Format
generic://example.com
Custom headers
You can add additional HTTP headers to your request by adding query variables prefixed with @ (@key=value).
Using
generic://example.com?@acceptLanguage=tlh-Piqd
would result in the additional header being added:
Accept-Language: tlh-PiqdJSON template
By using the built in JSON template (template=json) you can create a generic JSON payload.
Example
{
"title": "Foo CPU above threshold",
"message": "CPU averaged 63.53% for the previous 10 minutes."
}Modifying default keys
The keys used for title and message can be overriden by supplying the params/query values titlekey and messagekey.
generic://example.com?template=json&titlekey=subject&messagekey=content
{
"subject": "Foo CPU above threshold",
"content": "CPU averaged 63.53% for the previous 10 minutes."
}Custom data fields
When using the JSON template, you can add additional key/value pairs to the JSON object by adding query variables prefixed with $ ($key=value).
Example
Using generic://example.com?template=json&$free=palestine would yield:
{
"title": "Foo CPU above threshold",
"message": "CPU averaged 63.53% for the previous 10 minutes.",
"free": "palestine"
}Forwarded query variables
All query variables that are not listed in the Query/Param Props section will be forwarded to the target endpoint.
If you need to pass a query variable that is reserved, you can prefix it with an underscore (_).
Example
The URL generic://example.com/api/v1/postStuff?contenttype=text/plain would send a POST message to https://example.com/api/v1/postStuff using the Content-Type: text/plain header.
If instead escaped, generic://example.com/api/v1/postStuff?_contenttype=text/plain would send a POST message to https://example.com/api/v1/postStuff?contenttype=text/plain using the Content-Type: application/json header (as it's the default).
Query Parameters
ContentType - The value of the Content-Type header
Default:application/jsonDisableTLS
Default: ❌NoMessageKey - The key that will be used for the message value
Default:messageRequestMethod
Default:POSTTemplate - The template used for creating the request payload
Default: emptyTitleKey - The key that will be used for the title value
Default:title