Create notification subscription
POST
Creates a notification subscription for the caller's environment. New subscriptions are created as active.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Subscription display name |
url | string | Yes | HTTP or HTTPS delivery URL |
filter | object | Yes | JSON Logic filter evaluated for each notification event |
authorization | object or null | No | Optional outbound authorization settings |
authorization.type | string | Yes, when authorization is set | Supported values: basic, bearer |
authorization.token | string | Yes, when authorization.type is bearer | Bearer token sent to the destination |
authorization.username | string | Yes, when authorization.type is basic | Basic-auth username |
authorization.password | string | Yes, when authorization.type is basic | Basic-auth password |
Filter validation
filtermust be valid JSON Logic- Only
event.*and supportedcomputed.*variables are allowed - Invalid body data or invalid filter expressions return
400
Response
201 Created
| Field | Type | Description |
|---|---|---|
id | string | New subscription identifier |
rsaKey | object | Public-key details for request verification |
rsaKey.public | string | Public RSA key in PEM format |
xNotificationToken | string | Token used in outbound notification headers |
Errors
400: invalid request body or filter definition
Example request
{
"name": "High impact alerts",
"url": "https://example.com/notify",
"filter": {
">=": [
{
"var": "computed.impact.max_24h"
},
3
]
},
"authorization": {
"type": "bearer",
"token": "CONFIGURED_TOKEN"
}
}
Example response
{
"id": "65f3b1d8e83b5d0a4af00c91",
"rsaKey": {
"public": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBg...\n-----END PUBLIC KEY-----"
},
"xNotificationToken": "0123456789abcdef0123456789abcdef"
}