Skip to main content
Teach the agreement a rule from alerts (don't flag this again)

Authorizations

Authorization
string
header
required

Personal API key sent as a bearer token, together with X-Organization-Id. The key must have at least the access level the endpoint requires (read, write or admin).

Headers

X-Organization-Id
string

The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations.

Path Parameters

id
string<uuid>
required

Body

application/json
note
string
required

The rule, in your own words: what Watchdog should accept from now on, ideally with a bound, such as "We accept freight differences under 2 % of the line".

Required string length: 1 - 2000
alert_ids
string<uuid>[]

Alerts to change. If any is unknown (404) or cannot be changed (409), nothing changes.

Required array length: 1 - 5000 elements
filter
object
excluded_alert_ids
string<uuid>[]

Alerts to leave out of a filter selection. Only valid with filter.

Required array length: 1 - 5000 elements
to_review
object

The verdict the selected alerts still to review take, in the same transaction as the rule. Omit it to leave them to review. False alarms made here start no run of their own; the rule has one. Alerts in completed claims keep theirs.

Response

The rule is recorded and its suggestions are on the way. Follow the run with getWorkflowRun.

workflow_run_id
string<uuid>
required

The agreement_context_suggestions run interpreting the rule.

alert_count
integer
required

Alerts the rule was taught from.

changed_count
integer
required

Alerts still to review that took the to_review verdict.

Required range: x >= 0