POST
/v1/notifications/rulesCreate a notification rule
Creates an alert rule for delivery failures, schema drift, volume drops, or health changes.
Authentication
Requires Authorization: Bearer ${API_KEY}. Create and rotate keys from the TrackLayer dashboard.
Request body schema
{
"name": "string",
"condition": "object",
"channels": [
"email | slack | webhook"
]
}Response schema · 201
{
"id": "rule_123",
"enabled": true
}Response example
{
"id": "rule_123",
"enabled": true
}Code examples
curl https://api.tracklayer.com/v1/notifications/rules \
-X POST \
-H "Authorization: Bearer ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{"event_name":"purchase","user_id":"u_123","properties":{"order_id":"100045","value":129}}'Try it out
Use the dashboard to create an API key, then run one of the examples above with TRACKLAYER_API_KEY set in your environment.