Skip to main content
POST
/
api
/
v1
/
notifications
/
rules
Create notification rule
curl --request POST \
  --url http://localhost:3000/api/v1/notifications/rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "events": [
    "<string>"
  ],
  "channels": [
    "<string>"
  ],
  "condition": null,
  "severity": "info",
  "cooldownMs": 1,
  "actions": [
    null
  ]
}
'
{
  "ok": true,
  "data": null
}

Authorizations

Authorization
string
header
required

API key passed as a Bearer token. Configure via the apiKeys field in polpo.json or the POLPO_API_KEY environment variable.

Body

application/json
name
string
required
Minimum string length: 1
events
string[]
required
Minimum array length: 1
Minimum string length: 1
channels
string[]
Minimum string length: 1
condition
unknown
severity
enum<string>
Available options:
info,
warning,
critical
cooldownMs
integer
Required range: x >= 0
actions
null[]

Response

Rule created

ok
boolean
required
data
unknown