Skip to main content
POST
/
policies
/
new_alert
Create alert rule
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.

Body

application/json

Create an alert rule with inline notification targets.

tenant_id
string
required
name
string
required
Example:

"Approval needed"

condition
object
required
notifications
object[]
required
Minimum array length: 1
description
string
enabled
boolean
default:true

Response

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.

rule_id
string
required

Unique rule identifier.

tenant_id
string
required
name
string
required

Human-readable name.

Example:

"Approval needed"

condition
object
required

Condition that triggers this alert.

notifications
object[]
required

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.

enabled
boolean
required
description
string
Example:

"Notify when a message needs human input."

created_at
string<date-time>
updated_at
string<date-time>