Skip to content

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.

Needs an API key in the Authorization header.

On this page

Parameters

FieldInTypeDescription
idrequiredpathstring
The alert address's id.
  • format: uuid
tokenrequiredpathstring
The alert address's secret.
Titleheaderstring
The alert's title.
Priorityheaderstring
1-5, or min, low, default, high, urgent.
Tagsheaderstring
Comma-separated tags.
Clickheaderstring
An http or https link the alert opens.
Actionsheaderstring
View actions: view, Label, https://link; separated by semicolons.
Markdownheaderstring
yes to render the message as Markdown.
X-Dedup-Keyheaderstring
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

StatusMeaning
200OK

Can also answer the common errors 400, 401, 403, 404, 429. See common errors