Post an alert the ntfy way
POST
/api/alerts/{id}/{token}The body is the message; the rest goes in headers or the query. With the token message, it is Gotify's create-message, the secret as ?token= or X-Gotify-Key.
On this page
Parameters
| Field | In | Type | Description |
|---|---|---|---|
idrequired | path | string | The alert address's id.
|
tokenrequired | path | string | The alert address's secret. |
Title | header | string | The alert's title. |
Priority | header | string | 1-5, or min, low, default, high, urgent. |
Tags | header | string | Comma-separated tags. |
Click | header | string | An http or https link the alert opens. |
Actions | header | string | View actions: view, Label, https://link; separated by semicolons. |
Markdown | header | string | yes to render the message as Markdown. |
X-Dedup-Key | header | string | Repeats with the same key fold into one alert for an hour. |
Example request
curl -X POST "https://polaris.example.com/api/alerts/{id}/{token}" \
-H "Authorization: Bearer $POLARIS_API_KEY"Responses
| Status | Meaning |
|---|---|
200 | OK |
Can also answer the common errors 400, 401, 403, 404, 429. See common errors