Create a notification rule
Create a new rule together with its actions in a single call. The scope target (site or tag) is validated against the org. Requires org owner role.
bearerAuthAuthentifizierungBearer <token>API token generated from the fastmon dashboard (Account → API Token) or at organization level (fmo_…, one that outlives its creator). Send as Authorization: Bearer fm_... or paste the full token (including its prefix) into the Authorize dialog.
org_id*Org Iduuidapplication/json- body
name*NameWhat the rule is called in the list and in the notification it sends.
1 <= length <= 100is_active?Is ActiveWhether the rule is evaluated at all.
truescope_type*ScopeTypeWhat the rule watches: one domain, or every domain carrying a tag.
"site""tag"site_id?|The domain, when scope_type is site.
tag?|The tag, when scope_type is tag.
metric*MetricWhich measurement is compared, for example lcp or error_count.
aggregation*AggregationHow the measurement is reduced over the window, a percentile or an average.
identity?|Which identifier counts a visitor, for metrics that count visitors.
operator*OperatorHow the value is compared with the threshold.
"gt""gte""lt""lte"condition_type*ConditionTypeWhether the threshold is an absolute value or a change against the baseline window.
"absolute""relative_change"threshold*ThresholdThe number the value is compared with. A ratio for a relative change.
window_seconds*Window SecondsHow much recent data one evaluation looks at.
baseline_window_seconds?|The window a relative change is measured against. Only for relative_change.
filters?|Narrow what is measured, for example to one country or one device type.
re_notify_after_seconds?|How long to stay quiet before notifying again while the condition holds. At least an hour. Null notifies once per episode.
actions*array<>Where a notification goes. At least one.
1 <= items <= 10Successful Response
application/json- response
id*IdIdentifier of the rule.
uuidorganization_id*Organization IdThe organization the rule belongs to.
uuidname*NameWhat the rule is called in the list and in the notification it sends.
is_active*Is ActiveWhether the rule is evaluated at all.
scope_type*ScopeTypeWhat the rule watches: one domain, or every domain carrying a tag.
"site""tag"site_id?Site IdThe domain, when scope_type is site.
uuidtag?TagThe tag, when scope_type is tag.
metric*MetricWhich measurement is compared, for example lcp or error_count.
aggregation*RuleAggregationHow the measurement is reduced over the window, a percentile or an average.
"count""avg""sum""min""max""p50""p75""p90""p95""p99"identity?IdentityWhich identifier counts a visitor, for metrics that count visitors.
operator*OperatorHow the value is compared with the threshold.
"gt""gte""lt""lte"condition_type*ConditionTypeWhether the threshold is an absolute value or a change against the baseline window.
"absolute""relative_change"threshold*ThresholdThe number the value is compared with. A ratio for a relative change.
window_seconds*Window SecondsHow much recent data one evaluation looks at.
baseline_window_seconds?Baseline Window SecondsThe window a relative change is measured against. Only for relative_change.
filters?Narrow what is measured, for example to one country or one device type.
re_notify_after_seconds?Re Notify After SecondsHow long to stay quiet before notifying again while the condition holds. At least an hour. Absent notifies once per episode.
last_evaluated_at?Last Evaluated AtWhen it was last evaluated. Absent until the first run.
date-timecreated_at*Created AtWhen it was created.
date-timeupdated_at*Updated AtWhen it last changed.
date-timeactions*array<>Where a notification goes.
curl -X POST 'https://api.fastmon.eu/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/notifications/rules' \ -H 'Content-Type: application/json' \ -d '{ "name": "string", "scope_type": "site", "metric": "string", "aggregation": "string", "operator": "gt", "condition_type": "absolute", "threshold": 0, "window_seconds": 0, "actions": [ { "type": "email", "config": {} } ]}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6", "name": "string", "is_active": true, "scope_type": "site", "site_id": "72771e6a-6f5e-4de4-a5b9-1266c4197811", "tag": "string", "metric": "string", "aggregation": "count", "identity": "string", "operator": "gt", "condition_type": "absolute", "threshold": 0, "window_seconds": 0, "baseline_window_seconds": 0, "filters": {}, "re_notify_after_seconds": 0, "last_evaluated_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "actions": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "email", "is_active": true, "config": {} } ]}