Creates an alert rule that triggers notifications when specified conditions are met. Each rule is bound to one or more notification channels.
curl --request POST \
--url https://api.svantic.com/policies/new_alert \
--header 'Content-Type: application/json' \
--data '
{
"tenant_id": "<string>",
"name": "Approval needed",
"condition": {
"event": "message.input_required",
"filters": {}
},
"notifications": [
{
"type": "webhook",
"config": {},
"enabled": true
}
],
"description": "<string>",
"enabled": true
}
'{
"rule_id": "<string>",
"tenant_id": "<string>",
"name": "Approval needed",
"condition": {
"event": "message.input_required",
"filters": {}
},
"notifications": [
{
"type": "webhook",
"config": {},
"enabled": true
}
],
"enabled": true,
"description": "Notify when a message needs human input.",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Documentation Index
Fetch the complete documentation index at: https://docs.svantic.com/llms.txt
Use this file to discover all available pages before exploring further.
Alert rule created.
An alert rule — defines a condition that triggers notifications and the channels to deliver them to. Channel types (webhook, slack, email) are built into the platform; each has a specific renderer and notifier.
Unique rule identifier.
Human-readable name.
"Approval needed"
Condition that triggers this alert.
Show child attributes
Where to send when this rule fires. Each entry is a built-in channel type with its config. Svantic ships renderers and notifiers for each supported type.
Show child attributes
"Notify when a message needs human input."
curl --request POST \
--url https://api.svantic.com/policies/new_alert \
--header 'Content-Type: application/json' \
--data '
{
"tenant_id": "<string>",
"name": "Approval needed",
"condition": {
"event": "message.input_required",
"filters": {}
},
"notifications": [
{
"type": "webhook",
"config": {},
"enabled": true
}
],
"description": "<string>",
"enabled": true
}
'{
"rule_id": "<string>",
"tenant_id": "<string>",
"name": "Approval needed",
"condition": {
"event": "message.input_required",
"filters": {}
},
"notifications": [
{
"type": "webhook",
"config": {},
"enabled": true
}
],
"enabled": true,
"description": "Notify when a message needs human input.",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}