cURL
curl --request POST \ --url https://api.vela.dev/v1/apps/{appId}/notification-rules \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "Alert on large payment failure", "eventName": "payment.failed", "enabled": true, "conditions": [ { "id": "cond-1", "field": "amountCents", "operator": "greater_than", "value": 10000 } ], "actions": [ { "id": "action-1", "destinationId": "dest-uuid", "channel": "slack", "enabled": true } ] } '
{ "id": "rule-uuid", "appId": "app-uuid", "name": "Alert on large payment failure", "eventName": "payment.failed", "conditions": [ { "id": "cond-1", "field": "amountCents", "operator": "greater_than", "value": 10000 } ], "actions": [ { "id": "action-1", "destinationId": "dest-uuid", "channel": "slack", "target": null, "enabled": true } ], "enabled": true, "lastTriggeredAt": null, "triggerCount": 0, "createdAt": "2024-06-01T12:00:00.000Z" }
Creates a new notification rule.
Client secret for management API access. Format: vela_cs_...
vela_cs_...
App UUID or slug
Rule display name
Event name to watch
Array of conditions (empty array = trigger on all)
Show child attributes
Array of delivery actions
Rule created
Rule identifier
Conditions to evaluate (empty = trigger on all)
Delivery actions